submissions: implement ScriptWrite permission
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Quaternions 2024-12-26 17:54:42 -08:00
parent 25dbc038ca
commit c085ea9b7d

View File

@ -15,6 +15,8 @@ var (
) )
var ( var (
// has ScriptWrite
RoleQuat int32 = 255
// has SubmissionPublish // has SubmissionPublish
RoleMapAdmin int32 = 128 RoleMapAdmin int32 = 128
// has SubmissionReview // has SubmissionReview
@ -80,6 +82,9 @@ func (svc SecurityHandler) HandleCookieAuth(ctx context.Context, operationName a
// fix this when roblox udpates group roles // fix this when roblox udpates group roles
for _, r := range role.Roles { for _, r := range role.Roles {
if RoleQuat <= r.Rank {
roles.ScriptWrite = true
}
if RoleMapAdmin <= r.Rank { if RoleMapAdmin <= r.Rank {
roles.SubmissionRelease = true roles.SubmissionRelease = true
} }