Add support for org-wide default permissions

This commit is contained in:
Joseph Schorr 2014-01-21 18:34:54 -05:00
parent e1e283698e
commit 3da5a77e33
4 changed files with 56 additions and 13 deletions

View file

@ -1524,6 +1524,7 @@ quayApp.directive('prototypeManager', function () {
$scope.activatingForNew = null;
$scope.delegateForNew = null;
$scope.clearCounter = 0;
$scope.newForWholeOrg = true;
$scope.roles = [
{ 'id': 'read', 'title': 'Read', 'kind': 'success' },
@ -1558,15 +1559,24 @@ quayApp.directive('prototypeManager', function () {
});
};
$scope.comparePrototypes = function(p) {
return p.activating_user ? p.activating_user.name : ' ';
};
$scope.setRoleForNew = function(role) {
$scope.newRole = role;
};
$scope.setNewForWholeOrg = function(value) {
$scope.newForWholeOrg = value;
};
$scope.showAddDialog = function() {
$scope.activatingForNew = null;
$scope.delegateForNew = null;
$scope.newRole = 'read';
$scope.clearCounter++;
$scope.newForWholeOrg = true;
$('#addPermissionDialogModal').modal({});
};
@ -1578,7 +1588,7 @@ quayApp.directive('prototypeManager', function () {
};
var data = {
'activating_user': $scope.activatingForNew,
'activating_user': $scope.newForWholeOrg ? null : $scope.activatingForNew,
'delegate': $scope.delegateForNew,
'role': $scope.newRole
};