2015-03-16 18:17:27 +00:00
|
|
|
<div class="repository-permissions-table-element">
|
|
|
|
<div class="resource-view"
|
|
|
|
resources="[permissionResources.team, permissionResources.user]"
|
|
|
|
error-message="'Could not load repository permissions'">
|
2015-03-31 18:36:09 +00:00
|
|
|
<table class="co-table no-lines permissions">
|
2015-04-01 18:23:39 +00:00
|
|
|
<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>
|
|
|
|
|
2015-03-16 18:17:27 +00:00
|
|
|
<!-- Team Permissions -->
|
2015-04-01 18:23:39 +00:00
|
|
|
<tr class="co-table-header-row"
|
|
|
|
ng-if="(permissionResources.team.value | objectFilter:allEntries).length">
|
2015-03-31 18:36:09 +00:00
|
|
|
<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">
|
2015-03-16 18:17:27 +00:00
|
|
|
<td class="team entity">
|
|
|
|
<span class="entity-reference" namespace="repository.namespace"
|
2015-04-01 18:23:39 +00:00
|
|
|
entity="buildEntityForPermission(permission, 'team')"
|
2015-03-30 21:55:04 +00:00
|
|
|
avatar-size="24">
|
2015-03-16 18:17:27 +00:00
|
|
|
</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>
|
2015-03-16 18:17:27 +00:00
|
|
|
</td>
|
2015-03-16 21:03:26 +00:00
|
|
|
|
|
|
|
<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>
|
2015-03-16 18:17:27 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<!-- User Permissions -->
|
2015-04-01 18:23:39 +00:00
|
|
|
<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>
|
2015-03-31 18:36:09 +00:00
|
|
|
</tr>
|
2015-04-01 18:23:39 +00:00
|
|
|
<tr class="indented-row"
|
|
|
|
ng-repeat="permission in (permissionResources.user.value | objectFilter:onlyUser)">
|
2015-03-31 18:36:09 +00:00
|
|
|
<td class="user-permission-entity">
|
2015-03-16 18:17:27 +00:00
|
|
|
<span class="entity-reference" namespace="repository.namespace"
|
2015-04-01 18:23:39 +00:00
|
|
|
entity="buildEntityForPermission(permission, 'user')"
|
2015-03-30 21:55:04 +00:00
|
|
|
avatar-size="24">
|
2015-03-16 18:17:27 +00:00
|
|
|
</span>
|
2015-03-31 18:36:09 +00:00
|
|
|
<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>
|
2015-03-16 18:17:27 +00:00
|
|
|
</td>
|
|
|
|
<td class="user-permissions">
|
|
|
|
<div class="btn-group btn-group-sm">
|
2015-04-01 18:23:39 +00:00
|
|
|
<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>
|
2015-04-01 18:23:39 +00:00
|
|
|
</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">
|
|
|
|
<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"
|
2015-04-20 21:42:33 +00:00
|
|
|
role-changed="setRole(role, permission.name, 'user')"
|
|
|
|
roles="repoRoles"></span>
|
2015-03-16 18:17:27 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
2015-03-16 21:03:26 +00:00
|
|
|
<td class="options-col">
|
|
|
|
<span class="cor-options-menu">
|
2015-04-01 18:23:39 +00:00
|
|
|
<span class="cor-option" option-click="deleteRole(permission.name, 'user')">
|
2015-03-16 21:03:26 +00:00
|
|
|
<i class="fa fa-times"></i> Delete Permission
|
|
|
|
</span>
|
|
|
|
</span>
|
2015-03-16 18:17:27 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2015-03-31 18:36:09 +00:00
|
|
|
<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)'">
|
2015-03-16 18:17:27 +00:00
|
|
|
<td id="add-entity-permission" class="admin-search">
|
|
|
|
<span class="entity-search" namespace="repository.namespace"
|
2015-03-16 18:49:57 +00:00
|
|
|
placeholder="'Select a ' + (repository.is_organization ? 'team or ' : '') + 'user...'"
|
|
|
|
current-entity="addPermissionInfo.entity"></span>
|
2015-03-16 18:17:27 +00:00
|
|
|
</td>
|
2015-03-16 21:03:26 +00:00
|
|
|
<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>
|
2015-03-16 21:03:26 +00:00
|
|
|
<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>
|
2015-03-16 18:17:27 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2015-04-20 21:42:33 +00:00
|
|
|
|
2015-04-21 16:02:59 +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"
|
|
|
|
placeholder="'Select a ' + (repository.is_organization ? 'team or ' : '') + 'user...'"
|
2015-04-21 16:02:59 +00:00
|
|
|
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>
|
2015-04-21 16:02:59 +00:00
|
|
|
<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>
|
2015-03-16 18:17:27 +00:00
|
|
|
</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>
|
2015-03-30 21:55:04 +00:00
|
|
|
</div>
|