Skip to content

UserPermissions ​

Type
Class
Namespace
craft\mcp\capabilities
Inherits
craft\mcp\capabilities\UserPermissions
Since
5.12.0

View source

Public Methods ​

MethodDescription
__construct()
getGroup()
getUser()
list()
resource()
setGroup()
setUser()

__construct() ​

View source

Arguments ​

  • $actor
  • $permissions
  • $users
  • $userGroups

getGroup() ​

View source

Arguments ​

  • $groupId
  • $groupUid
  • $groupHandle

Returns ​

array<string,mixed>

getUser() ​

View source

Arguments ​

  • $userId
  • $userUid
  • $username
  • $email

Returns ​

array<string,mixed>

list() ​

View source

Returns ​

array{count: int, groups: list<array<string,mixed>>}

resource() ​

View source

Returns ​

array{count: int, groups: list<array<string,mixed>>}

setGroup() ​

View source

Arguments ​

  • $permissions (list<string>) – Complete list of direct permission keys to assign.
  • $groupId
  • $groupUid
  • $groupHandle

Returns ​

array<string,mixed>

setUser() ​

View source

Arguments ​

  • $permissions (list<string>) – Complete list of direct permission keys to assign.
  • $userId
  • $userUid
  • $username
  • $email

Returns ​

array<string,mixed>