Tabela _sec-granted-role

This table defines the roles that are granted to specific users or to other roles for the purpose of grouping roles. The _Grantee is therefore either a user or a role.\n\nThe SQL standard states that a role cannot be defined with the same name as a user account and vice-versa. This constraint is generally useful and is enforced in all cases, thereby avoiding the need to record whether a granted role is for a user or for a role.\n\nThe definition of roles in the _sec-role table is optional as only the role name is required, but if roles are defined then validation will be implemented to ensure that only a valid role is used.\n\nThe grant sequence defines the order that any privileges associated with the role should be applied in order to resolve conflicting privileges in multiple granted roles. The grant sequence is not important for SQL roles because in SQL all privileges are positive in nature and therefore conflicts are not an issue. Privileges simply accumulate in SQL for the user and their roles. Despite this the sequence field would still be specified to support the granting of a role to a user multiple times.\n\nA role may be granted according to a pre-determined condition, e.g. the role may only be valid when the user logs into a specific company or module or between certain hours. The grant condition could contain tokens that could be checked at runtime against the authenticated credentials. This concept does not exist in SQL and so for SQL would be ignored.\n\nSpecifically to support SQL, when a role is granted to a user or role, it can optionally be specified with admin rights that additionally grant the ability to pass the role onto other users or roles. This concept however could also be useful for non-SQL applications.\n
6campos

Campos da tabela _sec-granted-role

6 campos no dicionário de dados do TOTVS Datasul.

CampoDescrição
_Grantor
varchar
The user or the role that granted the use of this role and its associated permissions.\n
Máscara:
X(32)
_Role-name
varchar
This is the name of the role being granted and the specified role must be defined in the _sec-role definition table.\nThe role name will be defined with a namespace to avoid conflicts. It will be limited to 32 characters and will be case insensitive.\n\nThe SQL standard states that a role cannot be defined with the same name as a user account and vice-versa. This constraint is generally useful and is enforced in all cases, thereby avoiding the need to record whether a granted role is for a user or for a role.\n\nSystem roles (e.g. DBA) will follow a standard naming convention in that they will all start with an underscore and a code to help determine which clients the system role is applicable to as follows;\n\n_SYS - System role applicable to all clients\n_PVM - PVM specific role. This role is only valid for 4GL clients\n_SQL - SQL specific role. This role is only valid for SQL clients\n\nThis is purely a convention and no behavior is currently enforced that depends on it.\n\nFor non-system roles, the same distinction between clients is also valid, so similar rules will be applied for role names that conform to the following convention;\n\nrolename beings with;\nSYS - applicable to all clients\nPVM - PVM specific role. This role is only valid for 4GL clients\nSQL - SQL specific role. This role is only valid for SQL clients\n\nIf the rolename does not begin with any of the above, then the role will be applicable to all clients by default.\n
Máscara:
X(32)
_Custom-grant-detail
varchar
This is a custom field to specify additional grant details.
Máscara:
X(500)
_Grantee
varchar
The user or the role that is granted the use of this role and its associated permissions.\n
Máscara:
X(32)
_Grant-rights
bit
If set to YES, the user or role may grant the use of this role to other users or roles. This is a SQL concept but could be useful for non-SQL applications as well.\n
Máscara:
YES/NO
Valor padrão:
0
_Granted-role-guid
varchar
This is a globally unique identifier (guid) to identify this role membership record. This field is used as the foreign key for related tables that extend the standard functionality, e.g. for the _sec-granted-role-condition to limit the conditions under which the role is granted.\n
Máscara:
X(28)

SELECT de exemplo da tabela _sec-granted-role

Datasul roda em Progress/OpenEdge: via SQL, as tabelas ficam no schema PUB e nomes com hífen vão entre aspas.

SQL · OpenEdge
SELECT TOP 100
  t1."_Grantor",
  t1."_Role-name",
  t1."_Custom-grant-detail",
  t1."_Grantee",
  t1."_Grant-rights",
  t1."_Granted-role-guid"
FROM PUB."_sec-granted-role" t1

Tabelas próximas no índice do Datasul

Ver todas as tabelas com “0-9”

O ERPSeeker é um projeto independente, sem vínculo com a TOTVS. A estrutura pode variar conforme a versão e as customizações do seu ambiente.