Skip to content

elevatedPerms should be used as constant object (currently unused) #109

Description

@davidzwa

The elevatedPerms is not used right now. Instead strings are used:

const elevatedPerms = [

and the problem occurrence:
if (keyPermissions.includes('Administrator'))

Expected Behavior

Strings can cause typos and this is not checked by IDE.

Current Behavior

Permission typos will not cause a 'squiggly line' in your IDE (yes in Javascript)

Possible Solution

Use the elevatedPerms as key-value object (not as array)

Steps to Reproduce (for bugs)

Not appl.

Context

Dev PR Review #105

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions