Redo the permissions table to have different sections for users and robot accounts
This commit is contained in:
parent
5cd500257d
commit
5fc8e632d6
3 changed files with 100 additions and 12 deletions
|
@ -11,14 +11,26 @@
|
|||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr ng-show="!hasPermissions(permissionResources.team, permissionResources.user)">
|
||||
<td colspan="3">
|
||||
<div class="empty">
|
||||
<div class="empty-primary-msg">No permissions found.</div>
|
||||
<div class="empty-secondary-msg">
|
||||
To add a permission, enter the information below and click "Add Permission".
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Team Permissions -->
|
||||
<tr class="co-table-header-row" ng-if="permissionResources.team.value">
|
||||
<tr class="co-table-header-row"
|
||||
ng-if="(permissionResources.team.value | objectFilter:allEntries).length">
|
||||
<td colspan="3"><i class="fa fa-group"></i> Team Permissions</td>
|
||||
</tr>
|
||||
<tr class="indented-row" ng-repeat="(name, permission) in permissionResources.team.value">
|
||||
<td class="team entity">
|
||||
<span class="entity-reference" namespace="repository.namespace"
|
||||
entity="buildEntityForPermission(name, permission, 'team')"
|
||||
entity="buildEntityForPermission(permission, 'team')"
|
||||
avatar-size="24">
|
||||
</span>
|
||||
</td>
|
||||
|
@ -36,13 +48,15 @@
|
|||
</tr>
|
||||
|
||||
<!-- User Permissions -->
|
||||
<tr class="co-table-header-row" ng-if="permissionResources.user.value">
|
||||
<td colspan="3"><i class="fa fa-user"></i> User and Robot Account Permissions</td>
|
||||
<tr class="co-table-header-row"
|
||||
ng-if="(permissionResources.user.value | objectFilter:onlyUser).length">
|
||||
<td colspan="3"><i class="fa fa-user"></i> User Permissions</td>
|
||||
</tr>
|
||||
<tr class="indented-row" ng-repeat="(name, permission) in permissionResources.user.value">
|
||||
<tr class="indented-row"
|
||||
ng-repeat="permission in (permissionResources.user.value | objectFilter:onlyUser)">
|
||||
<td class="user-permission-entity">
|
||||
<span class="entity-reference" namespace="repository.namespace"
|
||||
entity="buildEntityForPermission(name, permission, 'user')"
|
||||
entity="buildEntityForPermission(permission, 'user')"
|
||||
avatar-size="24">
|
||||
</span>
|
||||
<i class="fa fa-exclamation-triangle outside-org"
|
||||
|
@ -51,12 +65,41 @@
|
|||
</td>
|
||||
<td class="user-permissions">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<span class="role-group" current-role="permission.role" role-changed="setRole(role, name, 'user')" roles="roles"></span>
|
||||
<span class="role-group" current-role="permission.role"
|
||||
role-changed="setRole(role, permission.name, 'user')" roles="roles"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="options-col">
|
||||
<span class="cor-options-menu">
|
||||
<span class="cor-option" option-click="deleteRole(name, 'user')">
|
||||
<span class="cor-option" option-click="deleteRole(permission.name, 'user')">
|
||||
<i class="fa fa-times"></i> Delete Permission
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Robot Permissions -->
|
||||
<tr class="co-table-header-row"
|
||||
ng-if="(permissionResources.user.value | objectFilter:onlyRobot).length">
|
||||
<td colspan="3"><i class="fa fa-wrench"></i> Robot Account Permissions</td>
|
||||
</tr>
|
||||
<tr class="indented-row"
|
||||
ng-repeat="permission in (permissionResources.user.value | objectFilter:onlyRobot)">
|
||||
<td class="user-permission-entity">
|
||||
<span class="entity-reference" namespace="repository.namespace"
|
||||
entity="buildEntityForPermission(permission, 'user')"
|
||||
avatar-size="24">
|
||||
</span>
|
||||
</td>
|
||||
<td class="user-permissions">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<span class="role-group" current-role="permission.role"
|
||||
role-changed="setRole(role, permission.name, 'user')" roles="roles"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="options-col">
|
||||
<span class="cor-options-menu">
|
||||
<span class="cor-option" option-click="deleteRole(permission.name, 'user')">
|
||||
<i class="fa fa-times"></i> Delete Permission
|
||||
</span>
|
||||
</span>
|
||||
|
|
Reference in a new issue