Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handling invalid permissions when creating/updating custom roles #16632

Labels
apiArea: HTTP APIdesign neededRequest for more beauty
@Emyrk

Description

@Emyrk

When posting a custom role, invalid permissions are omitted by the backend:

SitePermissions:db2sdk.List(filterInvalidPermissions(req.SitePermissions),sdkPermissionToDB),
OrgPermissions:db2sdk.List(filterInvalidPermissions(req.OrganizationPermissions),sdkPermissionToDB),
UserPermissions:db2sdk.List(filterInvalidPermissions(req.UserPermissions),sdkPermissionToDB),

This was done to prevent an unsolvable error. If an invalid permission was to exist (via some migration or other means). The custom role could never be updated via the UI, as the permissions do not exist to "uncheck".

The solution was to ignore invalid permissions. This has the downside of silently removing things, which could be intuitive.

Invalid permissions should have some UX, maybe a warning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIdesign neededRequest for more beauty

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp