grantPermissions
Returns a new Feature with the specified permissions granted.
This is a convenience vararg overload of grantPermissions for granting permissions inline. Permissions that already exist will not be duplicated (since Feature.permissions is a Set).
Example:
val updated = feature.grantPermissions("ADMIN", "BETA_TESTER", "POWER_USER")Content copied to clipboard
Return
a new Feature with the permissions added
Parameters
permissions
the permissions to grant
See also
for the Collection version
Returns a new Feature with the specified permissions granted.
Adds the provided permissions to the feature's permission set. Permissions that already exist will not be duplicated. This maintains immutability by returning a new instance.
Example:
val newPermissions = setOf("ADMIN", "MODERATOR")
val updated = feature.grantPermissions(newPermissions)Content copied to clipboard
Return
a new Feature with the permissions added
Parameters
permissions
the collection of permissions to grant