Documentation ¶
Overview ¶
DAL uses 4 database roles/users to perform all operations, - `TENANT_READER` - has read access to its tenant's data - `READER` - has read access to all tenants' data - `TENANT_WRITER` - has read & write access to its tenant's data - `WRITER` - has read & write access to all tenants' data DAL allows to map a user's service role to the DB role that will be used for that user. If a user has multiple service roles which map to several DB roles, the DB role with the most extensive privileges will be used (see `DbRoles()` for reference to ordered list of DbRoles.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbRoleSlice ¶
type DbRoleSlice []DbRole // Needed for sorting records
func DbRoles ¶
func DbRoles() DbRoleSlice
Returns *Ordered* slice of DbRoles. A reader role is always considered to have fewer permissions than a writer role. and a tenant-specific reader/writer role is always considered to have fewer permissions, than a non-tenant specific reader/writer role, respectively. NO_ROLE < TENANT_READER < READER < TENANT_WRITER < WRITER.
func (DbRoleSlice) Len ¶
func (a DbRoleSlice) Len() int
func (DbRoleSlice) Less ¶
func (a DbRoleSlice) Less(i, j int) bool
Returns true if the first role has fewer permissions than the second role, and true if the two roles are the same or the second role has more permissions.
func (DbRoleSlice) Swap ¶
func (a DbRoleSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.