Remove Utils.GetGroup().
This method duplicates Groups.GetGroupByName().
This commit is contained in:
parent
3ac52091ea
commit
332e6b2518
7 changed files with 11 additions and 27 deletions
|
|
@ -144,7 +144,7 @@ namespace Rests
|
|||
return new RestObject("403") { Error = "Username or password may be incorrect or this account may not have sufficient privileges." };
|
||||
}
|
||||
|
||||
Group userGroup = TShock.Utils.GetGroup(userAccount.Group);
|
||||
Group userGroup = TShock.Groups.GetGroupByName(userAccount.Group);
|
||||
if (!userGroup.HasPermission(RestPermissions.restapi) && userAccount.Group != "superadmin")
|
||||
{
|
||||
AddTokenToBucket(context.RemoteEndPoint.Address.ToString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue