SignupAuthentication canAddOthers for admin
This commit is contained in:
parent
048ccd7c4c
commit
d48186d4d6
@ -10,5 +10,6 @@ namespace API.Authentication.GrantNames
|
||||
public const string CanUpdate = "api.signup.update";
|
||||
public const string CanDeleteAny = "api.signup.delete.any";
|
||||
public const string CanDelete = "api.signup.delete";
|
||||
public const string CanAddOthers = "api.signup.add.others";
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ namespace API.Authentication
|
||||
}
|
||||
public bool canAdd(SignupDTO item, User user)
|
||||
{
|
||||
if (item.userId == user.id)
|
||||
return _grantManager.hasGrant(user.permissionId, SignupGrantNames.CanAdd);
|
||||
return _grantManager.hasGrant(user.permissionId, SignupGrantNames.CanAddOthers);
|
||||
}
|
||||
public bool canUpdate(Signup model, User user)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user