This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
🤖 Generated by Copilot at c2de8b5
This pull request improves the scope verification and management for various social services in the
server-core
package, such aschannel
,invite
,location
, andchannel-user
. It replaces the use ofadmin
scopes with more specific and relevant scopes, such aschannel:write
orlocation:write
, for better security and flexibility. It also removes some unused or duplicated code, refactors and optimizes some hooks, and adds a new scope typeinvite:write
to the database seed.References
refs #9161
Explanation
🤖 Generated by Copilot at c2de8b5
invite:write
to allow users to manage invites (link)channel-user
service: useverifyScope('channel', 'write')
forcreate
hook (link)channel
service: useverifyScope('channel', 'read')
forfind
hook, andverifyScope('channel', 'write')
forpatch
hook (link, link)invite
service: useverifyScope('invite', 'read')
forfind
hook, andverifyScope('invite', 'write')
forupdate
andpatch
hooks (link, link)location-admin
service: useverifyScope('location', 'write')
forcreate
,update
,patch
, andremove
hooks (link)location.class.ts
file (link, link, link)Knex
and comments for hook sections (link, link, link, link, link, link)makeLobbyHelper
function fromLocationService
class and use it inmakeLobbies
andmakeOldLocationLobby
functions (link, link, link)getUpdateResult
function from after patch hooks to after update hooks (link)duplicateNameError
function from after patch hooks to error hooks (link, link)🤖 Generated by Copilot at c2de8b5
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.
Checklist