Tabela _sec-role

This table defines the roles that are available to control authorized access to resources. The use of roles for authorization provides high scalability by minimizing the need to setup specific permissions against individual user accounts, with restrictions on specific user accounts being the exception case.\n\nThe definition of a role in this table is mandatory and a role cannot be granted to a user or other role until it is created in this table. This table therefore provides a registry of the available roles and can be used to validate rules such as the inability for a user to have the same name as a role and the limitation that a user can never authenticate as a role name.\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 role name will be defined with a namespace to avoid conflicts. The role name will be case insensitive and will be limited to 32 characters.\n\nThe role itself can be used as a permission and the fact the user is granted the role can drive authorized behavior. This concept will be used for internal system roles, e.g. a DBA or Audit Administrator. As far as possible however permissions for system roles will be explicit (defined in ACLs). System roles will follow a standard naming convention in that they will all start with an underscore and a code to determine which clients the system role is applicable to as follows;\n\n_SYS - Internal system role applicable to all clients\n_PVM - Internal PVM specific role. This role is only valid for 4GL clients\n_SQL - Internal SQL specific role. This role is only valid for SQL clients\nIn addition, for application defined roles they cannot begin with an underscore but can follow a similar convention, namely:\n\nSYS - Application defined role applicable to all clients\n4GL - Application defined role applicable to 4GL clients only\nSQL - Application defined role applicable to SQL clients only\n\nIf there is no such prefix to the role name then it will be assumed to be an application role applicable to all clients.\n\nNote that the above rules are purely a convention and not currently enforced by the database, or the SQL/4GL clients. It is strongly recommended that the convention is followed however to support future migration in the event that behavior is added later that uses this convention.\n\nAs mentioned above, the fact a user or role is granted membership of a role can be useful in itself for authorizing actions on resources, but to support a finer level of detailed permissions to be defined, roles can have explicit permissions granted or denied via the _sec-access-control-entry table used to define ACLs.\n\nSample rolenames could include;\n\n_sys.audit.admin\n_sys.audit.archive\n_sys.audit.insert\n
4campos

Campos da tabela _sec-role

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

CampoDescrição
_Role-name
varchar
The actual name of the role. The 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\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 begins 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)
_Role-creator
varchar
The name of the user or role that created / owns this role definition.
Máscara:
X(32)
_Role-description
varchar
A free text description to describe the purpose and the use of the role
Máscara:
X(500)
_Custom-role-detail
varchar
This is a free field to hold custom specific role details.
Máscara:
X(500)

SELECT de exemplo da tabela _sec-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."_Role-name",
  t1."_Role-creator",
  t1."_Role-description",
  t1."_Custom-role-detail"
FROM PUB."_sec-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.