FullName returns the role name scoped to the organization ID. This is useful if printing a set of roles from different scopes, as duplicated names across multiple scopes will become unique. In practice, this is primarily used in testing.
()
| 80 | // scopes will become unique. |
| 81 | // In practice, this is primarily used in testing. |
| 82 | func (r Role) FullName() string { |
| 83 | if r.OrganizationID == "" { |
| 84 | return r.Name |
| 85 | } |
| 86 | return r.Name + ":" + r.OrganizationID |
| 87 | } |
| 88 | |
| 89 | // CreateOrganizationRole will create a custom organization role |
| 90 | func (c *Client) CreateOrganizationRole(ctx context.Context, role Role) (Role, error) { |
no outgoing calls
no test coverage detected