mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 22:15:45 +01:00
correct error handling: groups and user permission can have the same name
This commit is contained in:
@@ -82,7 +82,11 @@ class CreatePermissionForm extends React.Component<Props, State> {
|
||||
|
||||
currentPermissionIncludeName = () => {
|
||||
for (let i = 0; i < this.props.currentPermissions.length; i++) {
|
||||
if (this.props.currentPermissions[i].name === this.state.name)
|
||||
if (
|
||||
this.props.currentPermissions[i].name === this.state.name &&
|
||||
this.props.currentPermissions[i].groupPermission ==
|
||||
this.state.groupPermission
|
||||
)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user