diff --git a/lemur/auth/permissions.py b/lemur/auth/permissions.py index 7b311874..79950b36 100644 --- a/lemur/auth/permissions.py +++ b/lemur/auth/permissions.py @@ -23,9 +23,10 @@ CertificateOwnerNeed = partial(CertificateOwner, 'certificateView') class ViewKeyPermission(Permission): - def __init__(self, role_id, certificate_id): + def __init__(self, certificate_id, owner_id): c_need = CertificateCreatorNeed(str(certificate_id)) - o_need = CertificateOwnerNeed(str(role_id)) + o_need = CertificateOwnerNeed(str(owner_id)) + super(ViewKeyPermission, self).__init__(o_need, c_need, RoleNeed('admin')) diff --git a/lemur/roles/views.py b/lemur/roles/views.py index 85774eb1..e19e2e06 100644 --- a/lemur/roles/views.py +++ b/lemur/roles/views.py @@ -140,7 +140,7 @@ class RolesList(AuthenticatedResource): self.reqparse.add_argument('description', type=str, location='json') self.reqparse.add_argument('username', type=str, location='json') self.reqparse.add_argument('password', type=str, location='json') - self.reqparse.add_argument('users', type=dict, location='json') + self.reqparse.add_argument('users', type=list, location='json') args = self.reqparse.parse_args() return service.create(args['name'], args.get('password'), args.get('description'), args.get('username'), diff --git a/lemur/static/app/angular/roles/role/role.js b/lemur/static/app/angular/roles/role/role.js index 2e977637..bcffdf52 100644 --- a/lemur/static/app/angular/roles/role/role.js +++ b/lemur/static/app/angular/roles/role/role.js @@ -18,6 +18,12 @@ angular.module('lemur') $modalInstance.dismiss('cancel'); }; + $scope.userPage = 1; + $scope.loadMoreRoles = function () { + $scope.userPage += 1; + RoleService.loadMoreUsers($scope.role, $scope.userPage); + }; + $scope.userService = UserService; $scope.roleService = RoleService; }) diff --git a/lemur/static/app/angular/roles/role/role.tpl.html b/lemur/static/app/angular/roles/role/role.tpl.html index dc36bf19..12287ada 100644 --- a/lemur/static/app/angular/roles/role/role.tpl.html +++ b/lemur/static/app/angular/roles/role/role.tpl.html @@ -27,7 +27,7 @@ Username
You must enter an password
{{ user.username }} | @@ -69,6 +69,10 @@|
+ | More | +