Opened 9 months ago

Closed 4 months ago

Last modified 4 months ago

#2043 closed enhancement (fixed)

Activating/deactivating roles on the fly in a login session

Reported by: nicklas Owned by: nicklas
Priority: major Milestone: BASE 3.11
Component: core Version:
Keywords: Cc:

Description (last modified by nicklas)

A user with multiple roles should be able to select which roles should be active during a session. For example, a user that is also an "Administrator" might want to disable the "Administrator" role until it is needed.

Which roles should be active after logging in? There are a number of possible options:

  1. It is automatically remembered per user.
  2. A configuration option for each role that forces a role to be either active or not.
  3. A combination of 1 and 2. Some roles are forced, some are remembered.
  4. As 3 but each user is allowed to configure which roles that should be active or not.

To preserve backwards compatibility, lack of configuration settings must mean that all roles are active.

UPDATE The final implementation is different from all of the above alternatives. The default setting is that all roles are active after logging in. A user may choose that some roles should be inactive after logging in (BASE -> Preferences -> Inactive roles dialog). Changes during the session are not remembered.

Change History (7)

comment:1 Changed 6 months ago by nicklas

  • Milestone changed from BASE Future Release to BASE 3.11

comment:2 Changed 6 months ago by nicklas

(In [7294]) References #2043: Activating/deactivating roles on the fly in a login session

Implemented support for setting a role as inactive in the core. New public methods are in the SessionControl class.

The getRoles() method has been deprecated and replaced with other methods (since this method return ALL roles including inactive). Code that uses this method for permission checking may experience PermissionDeniedExceptions if a users has de-activated a role.

The "User" menu to the far right has been updated to include a section with roles where the user can toggle the active/inactive status.

The settings are not (yet) remebered between sessions. All roles start out in the active state after logging in.

comment:3 Changed 6 months ago by nicklas

(In [7295]) References #2043: Activating/deactivating roles on the fly in a login session

Added a "Inactive roles" tab in the "Preferences" dialog. This allows a user to set roles that should be inactive by default after logging in.

comment:4 Changed 6 months ago by nicklas

  • Owner changed from everyone to nicklas
  • Status changed from new to assigned

comment:5 Changed 6 months ago by nicklas

(In [7300]) References #2043: Activating/deactivating roles on the fly in a login session

Updated images in the documentation and added a section about this feature.

comment:6 Changed 4 months ago by nicklas

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from assigned to closed

comment:7 Changed 4 months ago by nicklas

(In [7344]) References #2043: Activating/deactivating roles on the fly in a login session

Added note about this in the documentation about incompatible API changes.

Note: See TracTickets for help on using tickets.