mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 11:47:28 +01:00
Allow new members to create API tokens
This commit is contained in:
parent
ba7ed40d6a
commit
f986caf18b
@ -266,7 +266,7 @@ title: Ranks and Permissions
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create Token</td>
|
||||
<td></td> <!-- new -->
|
||||
<td>✓</td> <!-- new -->
|
||||
<td></td>
|
||||
<td>✓</td> <!-- member -->
|
||||
<td></td>
|
||||
|
@ -249,7 +249,7 @@ class User(db.Model, UserMixin):
|
||||
return user.rank.atLeast(UserRank.NEW_MEMBER if user == self else UserRank.MODERATOR)
|
||||
elif perm == Permission.CREATE_TOKEN:
|
||||
if user == self:
|
||||
return user.rank.atLeast(UserRank.MEMBER)
|
||||
return user.rank.atLeast(UserRank.NEW_MEMBER)
|
||||
else:
|
||||
return user.rank.atLeast(UserRank.MODERATOR) and user.rank.atLeast(self.rank)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user