This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/directives/repository-permissions-table.html

155 lines
6.7 KiB
HTML
Raw Normal View History

<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 no-lines permissions">
<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 | 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(permission, 'team')"
avatar-size="24">
</span>
</td>
<td class="user-permissions">
2015-04-20 21:42:33 +00:00
<span class="role-group" current-role="permission.role"
role-changed="setRole(role, name, 'team')" roles="repoRoles"></span>
</td>
<td class="options-col">
<span class="cor-options-menu">
<span class="cor-option" option-click="deleteRole(name, 'team')">
<i class="fa fa-times"></i> Delete Permission
</span>
</span>
</td>
</tr>
<!-- User Permissions -->
<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="permission in (permissionResources.user.value | objectFilter:onlyUser)">
<td class="user-permission-entity">
<span class="entity-reference" namespace="repository.namespace"
entity="buildEntityForPermission(permission, 'user')"
avatar-size="24">
</span>
<i class="fa fa-exclamation-triangle outside-org"
ng-if="permission.is_org_member === false"
data-title="This user is not a member of the organization" bs-tooltip></i>
</td>
<td class="user-permissions">
<div class="btn-group btn-group-sm">
<span class="role-group" current-role="permission.role"
2015-04-20 21:42:33 +00:00
role-changed="setRole(role, permission.name, 'user')"
roles="repoRoles"></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>
</td>
</tr>
<!-- Robot Permissions -->
<tr class="co-table-header-row"
ng-if="(permissionResources.user.value | objectFilter:onlyRobot).length">
2015-04-23 20:41:47 +00:00
<td colspan="3"><i class="fa ci-robot"></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"
2015-04-20 21:42:33 +00:00
role-changed="setRole(role, permission.name, 'user')"
roles="repoRoles"></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>
</td>
</tr>
<tr class="add-row-spacer"><td colspan="3"></td></tr>
2015-04-20 21:42:33 +00:00
<tr class="add-row" ng-if-media="'(min-width: 768px)'">
<td id="add-entity-permission" class="admin-search">
<span class="entity-search" namespace="repository.namespace"
for-repository="repository"
skip-permissions="true"
2015-03-16 18:49:57 +00:00
placeholder="'Select a ' + (repository.is_organization ? 'team or ' : '') + 'user...'"
current-entity="addPermissionInfo.entity"></span>
</td>
<td colspan="2">
2015-04-20 21:42:33 +00:00
<span class="role-group" current-role="addPermissionInfo.role"
roles="repoRoles"
2015-03-16 18:49:57 +00:00
role-changed="addPermissionInfo.role = role"></span>
<button class="btn btn-success" style="margin-left: 10px"
2015-03-16 18:49:57 +00:00
ng-disabled="!addPermissionInfo.role || !addPermissionInfo.entity"
ng-click="addPermission()">
Add Permission
</button>
</td>
</tr>
</table>
2015-04-20 21:42:33 +00:00
<!-- Mobile add permissions -->
2015-04-20 21:42:33 +00:00
<div class="mobile-add-row" ng-if-media="'(max-width: 767px)'">
<span class="entity-search" namespace="repository.namespace"
for-repository="repository"
skip-permissions="true"
2015-04-20 21:42:33 +00:00
placeholder="'Select a ' + (repository.is_organization ? 'team or ' : '') + 'user...'"
current-entity="addPermissionInfo.entity"
pull-right="true"></span>
2015-04-20 21:42:33 +00:00
<span class="role-group" current-role="addPermissionInfo.role"
roles="repoRoles"
role-changed="addPermissionInfo.role = role"></span>
<button class="btn btn-success add-button"
2015-04-20 21:42:33 +00:00
ng-disabled="!addPermissionInfo.role || !addPermissionInfo.entity"
ng-click="addPermission()">
Add Permission
</button>
</div>
</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>