disable create access btn if there is no team or user (#10766)

pull/10810/head
Prabhat Khera 12 months ago committed by GitHub
parent 79f3e1b04b
commit 0f9b91a15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,7 +42,7 @@
<button
type="submit"
class="btn btn-primary btn-sm vertical-center"
ng-disabled="ctrl.formValues.multiselectOutput.length === 0 || ctrl.actionInProgress"
ng-disabled="ctrl.availableUsersAndTeams.length === 0 || ctrl.formValues.multiselectOutput.length === 0 || ctrl.actionInProgress"
ng-click="ctrl.authorizeAccess()"
button-spinner="ctrl.actionInProgress"
data-cy="access-createAccess"

@ -94,6 +94,7 @@ class PorAccessManagementController {
const roles = await this.RoleService.roles();
this.roles = _.orderBy(roles, 'Priority', 'asc');
this.formValues = {
multiselectOutput: [],
selectedRole: this.roles.find((role) => !this.isRoleLimitedToBE(role)),
};

Loading…
Cancel
Save