mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Added support for Managed Users #811
This commit is contained in:
parent
6048053c3c
commit
7f913de835
6 changed files with 21 additions and 12 deletions
|
@ -97,6 +97,8 @@ namespace Ombi.UI
|
|||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
|
||||
ServicePointManager.ServerCertificateValidationCallback +=
|
||||
(sender, certificate, chain, sslPolicyErrors) => true;
|
||||
|
||||
ServicePointManager.Expect100Continue = false;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<strong>Email Address</strong>
|
||||
<div class="form-group">
|
||||
<input id="emailAddress" type="email" ng-model="selectedUser.emailAddress" ng-disabled="selectedUser.type === 0" class="form-control form-control-custom" />
|
||||
<input id="emailAddress" type="email" ng-model="selectedUser.emailAddress" ng-disabled="selectedUser.emailDisabled" class="form-control form-control-custom" />
|
||||
</div>
|
||||
|
||||
<strong>Alias</strong>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
});
|
||||
$scope.selectedUser = user[0];
|
||||
|
||||
$scope.selectedUser.emailDisabled = $scope.selectedUser.type === 0 && $scope.selectedUser.managedUser == '';
|
||||
openSidebar();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace Ombi.UI.Models.UserManagement
|
|||
public DateTime LastLoggedIn { get; set; }
|
||||
public List<CheckBox> Permissions { get; set; }
|
||||
public List<CheckBox> Features { get; set; }
|
||||
public bool ManagedUser { get; set; }
|
||||
}
|
||||
|
||||
public class UserManagementPlexInformation
|
||||
|
|
|
@ -231,6 +231,7 @@ namespace Ombi.UI.Modules
|
|||
await UpdateRequests(plexDbUser.Username, plexDbUser.UserAlias, model.Alias);
|
||||
|
||||
plexDbUser.UserAlias = model.Alias;
|
||||
plexDbUser.EmailAddress = model.EmailAddress;
|
||||
|
||||
await PlexUsersRepository.UpdateAsync(plexDbUser);
|
||||
|
||||
|
@ -266,7 +267,7 @@ namespace Ombi.UI.Modules
|
|||
UserAlias = model.Alias,
|
||||
PlexUserId = plexUser.Id,
|
||||
EmailAddress = plexUser.Email,
|
||||
Username = plexUser.Username,
|
||||
Username = plexUser.Title,
|
||||
LoginId = Guid.NewGuid().ToString()
|
||||
};
|
||||
|
||||
|
@ -417,7 +418,7 @@ namespace Ombi.UI.Modules
|
|||
Id = plexInfo.Id,
|
||||
PermissionsFormattedString = newUser ? "Processing..." :( permissions == 0 ? "None" : permissions.ToString()),
|
||||
FeaturesFormattedString = newUser ? "Processing..." : features.ToString(),
|
||||
Username = plexInfo.Username,
|
||||
Username = plexInfo.Title,
|
||||
Type = UserType.PlexUser,
|
||||
EmailAddress = plexInfo.Email,
|
||||
Alias = dbUser?.UserAlias ?? string.Empty,
|
||||
|
@ -426,6 +427,7 @@ namespace Ombi.UI.Modules
|
|||
{
|
||||
Thumb = plexInfo.Thumb
|
||||
},
|
||||
ManagedUser = string.IsNullOrEmpty(plexInfo.Username)
|
||||
};
|
||||
|
||||
m.Permissions.AddRange(GetPermissions(permissions));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue