Fix logs for organization-wide default permissions
This commit is contained in:
parent
bd4c8c794d
commit
b91f9125db
2 changed files with 13 additions and 6 deletions
|
@ -1195,6 +1195,13 @@ quayApp.directive('logsView', function () {
|
|||
$scope.logStartDate = new Date(datetime.getUTCFullYear(), datetime.getUTCMonth(), datetime.getUTCDate() - 7);
|
||||
$scope.logEndDate = new Date(datetime.getUTCFullYear(), datetime.getUTCMonth(), datetime.getUTCDate());
|
||||
|
||||
var defaultPermSuffix = function(metadata) {
|
||||
if (metadata.activating_username) {
|
||||
return ', when creating user is {activating_username}';
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
var logDescriptions = {
|
||||
'account_change_plan': 'Change plan',
|
||||
'account_change_cc': 'Update credit card',
|
||||
|
@ -1248,23 +1255,23 @@ quayApp.directive('logsView', function () {
|
|||
'org_set_team_role': 'Change permission of team {team} to {role}',
|
||||
'create_prototype_permission': function(metadata) {
|
||||
if (metadata.delegate_user) {
|
||||
return 'Create default permission: {role} for {delegate_user}, when creating user is {activating_username}';
|
||||
return 'Create default permission: {role} for {delegate_user}' + defaultPermSuffix(metadata);
|
||||
} else if (metadata.delegate_team) {
|
||||
return 'Create default permission: {role} for {delegate_team}, when creating user is {activating_username}';
|
||||
return 'Create default permission: {role} for {delegate_team}' + defaultPermSuffix(metadata);
|
||||
}
|
||||
},
|
||||
'modify_prototype_permission': function(metadata) {
|
||||
if (metadata.delegate_user) {
|
||||
return 'Modify default permission: {role} (from {original_role}) for {delegate_user}, when creating user is {activating_username}';
|
||||
return 'Modify default permission: {role} (from {original_role}) for {delegate_user}' + defaultPermSuffix(metadata);
|
||||
} else if (metadata.delegate_team) {
|
||||
return 'Modify default permission: {role} (from {original_role}) for {delegate_team}, when creating user is {activating_username}';
|
||||
return 'Modify default permission: {role} (from {original_role}) for {delegate_team}' + defaultPermSuffix(metadata);
|
||||
}
|
||||
},
|
||||
'delete_prototype_permission': function(metadata) {
|
||||
if (metadata.delegate_user) {
|
||||
return 'Delete default permission: {role} for {delegate_user}, when creating user is {activating_username}';
|
||||
return 'Delete default permission: {role} for {delegate_user}' + defaultPermSuffix(metadata);
|
||||
} else if (metadata.delegate_team) {
|
||||
return 'Delete default permission: {role} for {delegate_team}, when creating user is {activating_username}';
|
||||
return 'Delete default permission: {role} for {delegate_team}' + defaultPermSuffix(metadata);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Binary file not shown.
Reference in a new issue