Permissions
Managing roles and objects permissions
Checking is an object has unique permissions
item := list.Items().GetByID(1)
hasUniqueAssignments, err := item.Roles().HasUniqueAssignments()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Has unique permissions: %t\n", hasUniqueAssignments)Breaking role inheritance
item := list.Items().GetByID(1)
if err := item.Roles().BreakInheritance(true, false); err != nil {
log.Fatal(err)
}
// where the first argument stands for `copyRoleAssigments`
// - if true the permissions are copied from the current parent scope
// second argument is `clearSubScopes`
// - true to make all child securable objects inherit role assignments
// from the current objectRole definitions
Getting principals
Adding role assignments
Removing role assignments
Reseting roles inheritance
Getting collection objects' permissions
Base permissions
Summary
Last updated
Was this helpful?
