Uploaded image for project: 'Clowder'
  1. Clowder
  2. CATS-989

remove explicit permissions from user spaceandrole

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      Currently the permissions associated with a Role are stored explicitly in the spaceandrole field of the user. If the permissions for a role are changed, these changes will not be taken into account when deciding what permissions a user has in a space since those are usually obtained from the UserSpaceAndRole field. Additionally, this means that every Role stored in spaceandrole replicates the same large list of permissions, which is unnecessary and can lead to 2 users with the same role having different permissions. If a new permission is added after a user was made 'Editor' the user will not have that permission. 

      Fixing this issue requires 3 parts which will be part of this issue.

      First, permissions for a Role will always be obtained by getting the role with the id or name. This means that the name and id of the role stored in spaceandrole will be used to retrieve the Role object as currently stored in the db. The user will then have whatever permissions the role has.

      Second, permissions will no longer be stored in the UserSpaceAndRole object. They will no longer be necessary and if permissions were changed, would not be accurate anyway.

      Third, the unnecessary Permissions that already exist will be dropped from the database.

              todd_n Todd Nicholson
              todd_n Todd Nicholson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified