1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00

UI: Superuser user panel settings icon permissions fix (PROJQUAY-3905) (#1364)

This commit is contained in:
Sunandadadi
2022-06-08 10:46:45 -04:00
committed by GitHub
parent 922a82a3d9
commit ba2aa54d3f
3 changed files with 7 additions and 3 deletions

View File

@@ -73,7 +73,7 @@
</td>
<td style="text-align: center;">
<span class="cor-options-menu"
ng-if="((current_user.super_user && user.username == current_user.username) ||
ng-if="((current_user.super_user && user.username == current_user.username && Features.QUOTA_MANAGEMENT) ||
!current_user.super_user) && !inReadOnlyMode">
<span class="cor-option" option-click="showChangeEmail(current_user)" ng-if="!current_user.super_user"
quay-show="Config.AUTHENTICATION_TYPE == 'Database' || Config.AUTHENTICATION_TYPE == 'AppToken'">
@@ -103,7 +103,7 @@
<i class="fa fa-bolt"></i> Take Ownership
</span>
<span class="cor-option" option-click="showQuotaConfig(current_user)"
quay-show="Features.QUOTA_MANAGEMENT" ng-if="user.username == current_user.username">
quay-show="Features.QUOTA_MANAGEMENT" ng-if="(current_user.super_user && user.username == current_user.username) || !current_user.super_user">
<i class="fa fa-gear"></i> Configure Quota
</span>
</span>

View File

@@ -15,7 +15,7 @@ angular.module('quay').directive('manageUserTab', function () {
TableService, Features, StateService) {
$scope.inReadOnlyMode = StateService.inReadOnlyMode();
$scope.Features = Features;
$scope.user = UserService.currentUser();
UserService.updateUserIn($scope);
$scope.users = null;
$scope.orderedUsers = [];
$scope.usersPerPage = 10;

View File

@@ -72,6 +72,10 @@ angular.module('quay').directive('quotaManagementView', function () {
}
var loadOrgQuota = function () {
if (!Features.QUOTA_MANAGEMENT) {
return;
}
let params = null;
let method = null;
if ($scope.organization != null){