-
-
Notifications
You must be signed in to change notification settings - Fork 137
fix: mock players in studio local server dont have permissions to use cmdr #602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,6 +147,12 @@ end | |
| function GroupPermissionProvider._handlePlayer(self: GroupPermissionProvider, player: Player): () | ||
| assert(player, "Bad player") | ||
|
|
||
| -- when testing with mock players in studio, their userids are negative | ||
| if player.UserId < 0 then | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to add a check for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was under the impression that returned false in local servers but I was wrong (its just team tests). I'll add that in.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think we should just completely replace the negative userid checks with
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah we should just use the IsStudio check |
||
| self._creatorCache[player.UserId] = true | ||
| return | ||
| end | ||
|
|
||
| self:_promiseRankInGroup(player):Then(function(rank) | ||
| if rank >= self._config.minAdminRequiredRank then | ||
| self._adminsCache[player.UserId] = true | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, need a check if we're studio with the UserId check