HomeDevCentral

Nwe feature: user actions

Description

Nwe feature: user actions

[ Feature description ]

We want to allow account provisionning, and this could be accompanied
by information about how to setup the new created user account.

For example, we expect that if a workspace implements an authentication
for a group of people, these are added to a group having access to the
workspace.

Another possibility would be to grant a precise permission.

[ Feature implementation ]

  • New abstract class UserAction
  • Two actions matching the behavior described below:
    • AddToGroupUserAction
    • GivePermissionUserAction

[ Core libraries new methods and function ]

  • User::isMemberOfGroup(UserGroup $group) Determines if the user is a member of the specified group
  • User::addToGroup (UserGroup $group, $isAdmin = false) Adds user to the specified group
  • User::setPermission ($resourceType, $resourceId, $permissionName, , $permissionFlag = 1) Sets user permission
  • static UserGroup::fromCode ($code) Loads the specified user group from code
  • get_resource_id ($resource_type, $identifier) Gets the resource ID from an identifier This allows to describe resources by codenames, not by numeric id.

Details

Provenance
derecksonAuthored on Jan 26 2014, 20:42
derecksonPushed on Oct 17 2025, 19:49
Parents
rOBSIDIANa1b8e76b75ff: New interface: RunnableWithContext
Branches
Unknown
Tags
Unknown

Event Timeline