Start work on the repo permissions table
This commit is contained in:
parent
1b6fc60c10
commit
dc5d40ddc3
6 changed files with 246 additions and 3 deletions
75
static/directives/repository-permissions-table.html
Normal file
75
static/directives/repository-permissions-table.html
Normal file
|
@ -0,0 +1,75 @@
|
|||
<div class="repository-permissions-table-element">
|
||||
<div class="resource-view"
|
||||
resources="[permissionResources.team, permissionResources.user]"
|
||||
error-message="'Could not load repository permissions'">
|
||||
<table class="co-table permissions">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="min-width: 400px;">Account Name</td>
|
||||
<td>Permissions</td>
|
||||
<td style="width: 95px;"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- Team Permissions -->
|
||||
<tr ng-repeat="(name, permission) in permissionResources.team.value">
|
||||
<td class="team entity">
|
||||
<span class="entity-reference" namespace="repository.namespace"
|
||||
entity="buildEntityForPermission(name, permission, 'team')">
|
||||
</span>
|
||||
</td>
|
||||
<td class="user-permissions">
|
||||
<span class="role-group" current-role="permission.role" role-changed="setRole(role, name, 'team')" roles="roles"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="delete-ui" delete-title="'Delete Permission'" perform-delete="deleteRole(name, 'team')"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- User Permissions -->
|
||||
<tr ng-repeat="(name, permission) in permissionResources.user.value">
|
||||
<td class="{{ 'user entity ' + (permission.is_org_member ? '' : 'outside') }}">
|
||||
<span class="entity-reference" namespace="repository.namespace"
|
||||
entity="buildEntityForPermission(name, permission, 'user')">
|
||||
</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, name, 'user')" roles="roles"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="delete-ui" delete-title="'Delete Permission'" perform-delete="deleteRole(name, 'user')"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3"><a href="asdasdasd">Add New Permission</a></td>
|
||||
</tr>
|
||||
|
||||
<tr style="background: #eee; ">
|
||||
<td id="add-entity-permission" class="admin-search">
|
||||
<span class="entity-search" namespace="repository.namespace"
|
||||
placeholder="'Add a ' + (repository.is_organization ? 'team or ' : '') + 'user...'"
|
||||
entity-selected="addNewPermission(entity)"
|
||||
current-entity="selectedEntity"
|
||||
auto-clear="true"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="role-group" current-role="permission.role" role-changed="setRole(role, name, 'team')" roles="roles"></span>
|
||||
|
||||
</td>
|
||||
<td><button class="btn btn-success">Add Permission</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Grant Permission Confirm -->
|
||||
<div class="cor-confirm-dialog"
|
||||
dialog-context="grantPermissionInfo"
|
||||
dialog-action="grantPermission(info.entity, callback)"
|
||||
dialog-title="Grant Permission"
|
||||
dialog-action-title="Grant Permission">
|
||||
The selected user is outside of your organization. Are you sure you want to grant the user access to this repository?
|
||||
</div>
|
||||
</div>
|
Reference in a new issue