Privileges and universes#
The metadata decides what each user sees and changes: which dimensions and metrics they see (column security), which records they can edit in the forms and which rows of each table reach them (universes, row security). Everything rests on privileges, which are given to users through roles. This page explains how they are set in the metadata; roles and security in general are in Security.
Before you start#
- You need Metadata administration to create privileges and set them in the metadata. Giving them to users (assigning them to roles) is done in Administration › Users and roles, with User administration.
- Privileges belong to the whole installation, not to a connection. Universes belong to each connection.
The three kinds of protection#
| Protection | Where it is set | What it does |
|---|---|---|
| Access privilege | On each dimension and each metric. | Whoever does not have it does not see the data: it is not offered to them, it is not queried and the documents that use it are shown to them without it, with a warning. |
| Edit privileges | On each fact table (insert, modify and delete records), on each dimension (change its value) and on each auxiliary table (add, change and delete values). | Who can change database data from the forms. |
| Universe | On a fact table, for a privilege. | Whoever has that privilege only sees the rows of the table that meet a condition, and those of its detail tables. |
The No level defined privilege is the default for everything that is not protected: all users have it.
The Security tab#
The editor's Security tab has two sections, Privileges and Universes.
Privileges#
A tree with all the privileges of the installation, in folders:
| Folder | What it has |
|---|---|
| Administration/Access | The system's administration and access privileges (System administration, Access to Empowerment Center…). They are not touched here. |
| Data/structure reading | The data access privileges, such as “Datos confidenciales (costes y márgenes)” (confidential data, costs and margins) or “Zona Norte” (north zone) in the demonstration. |
| Data/structure editing | The edit privileges, with the system's generic ones: Insert records (generic), Update records (generic), Delete records (generic) and Update dimension (generic). |
Folders and privileges are only created in Data/structure reading, in Data/structure editing and in their folders. The system's items cannot be renamed or deleted.
To create a privilege:
- Click New privilege… (or choose it in a folder's menu).
- Type the Name, by which it will be chosen in roles, dimensions and universes. It has to be different from those of its folder.
- Choose the Folder.
- Click Create privilege.
Nobody has a new privilege until it is assigned to a role. The editor's privilege selectors (on a dimension, a table or a universe) also offer New privilege… to create one without leaving.
Privileges and folders are moved by dragging them, with Move to… or with Alt and the arrows, and renamed with F2. Each change is saved at once.
When you choose a privilege, its panel states:
- Who has it: how many roles and users. It is given to users through roles, in Users and roles.
- Where it is used: the dimensions, metrics, tables, universes, lists, workbooks, portal pages and external data it protects, in all connections, with what would happen to each group if it were deleted.
Delete a privilege#
Deleting a privilege does not open up anything it protected:
| What it protected | What happens when it is deleted |
|---|---|
| Dimensions and metrics | They go to Metadata administration: only those who have it see them. |
| The editing of a dimension or a fact table | It goes to the generic privileges. |
| The editing of the values of an auxiliary table | Nobody can do it from the forms. |
| Lists | They go to Metadata administration. |
| Workbooks, portal pages and external data | They are closed to whoever does not administer them. |
| Universes | It cannot be deleted while a universe uses it. |
A folder is only deleted when empty: “The folder “…” cannot be deleted: it is not empty (…). Move or delete what it contains first.”
The access privilege of a dimension or a metric#
Whoever does not have the access privilege of a piece of data:
- does not see it in the wizards, in the presentation tree or in the segmentation editor;
- receives the documents that use it calculated without it, with a warning that counts what is missing without naming it;
- cannot save a document that uses it: for them it is read-only;
- cannot request it through the API, which answers that there are hidden columns without saying which.
A formula over metrics is only seen by whoever sees all the metrics it uses, even if it has no privilege of its own.
Change the access privilege#
- In the panel of the dimension or the metric, in Access, click Change… (or Change access privilege… in Where it is used).
- Choose the Access privilege.
- Read Whom it affects: who stops seeing it and who starts seeing it, with the roles that have the previous and the new privilege, and the documents that will be shown without it.
- Click Change privilege.
The change is saved at that moment, without waiting for the panel's Save changes.


Change the privileges of a whole table#
To protect at once all the dimensions or all the metrics of a fact table:
- In the table's panel, click Change the privileges of the whole table….
- In What it applies to, check the dimensions, the metrics or both.
- Choose the Access privilege and, for the dimensions, the Edit privilege of the dimensions. What you leave at Do not change it does not change.
- Read the summary and click Change privileges.
The edit privileges#
| Where | Privileges | By default |
|---|---|---|
| Fact table, Properties | Insert records, Modify records and Delete records | The generic ones of each operation |
| Dimension, General | Edit privilege: change only the value of that column | Update dimension (generic) |
| Auxiliary table, Inserts and deletes from forms | Add values, Change values and Delete values | No one |
Whoever can modify the table changes all its columns; whoever only has that of a dimension, only that one. A form never writes a column the user does not see. For nobody to edit anything, it is enough not to give any role the generic privileges or the ones you set.
Universes#
A universe limits the rows of a fact table that whoever has a privilege sees. In the demonstration there are 10: for each of the five zones, one on Clientes and another on Vendedores. Whoever has “Zona Norte” only sees the customers and sales reps of the North and, through the relationships, their invoices, incidents, targets and invoice lines, which have no universe of their own: those of their customers and sales reps reach them.
The rules#
- A universe applies to whoever has its privilege through any of their roles.
- Whoever has several privileges with universes on the same table sees the rows of any of them (in the demonstration, “jefe.noreste” sees the North and the East).
- Whoever has no privilege with a universe on a table sees all its rows.
- It propagates to the detail tables through the relationships: the universe of a master limits the rows of its details in any query, even if the master is not in it.
- It also applies to the values chosen from an auxiliary table that is a fact table, to lists, to forms and to the API.
Create a universe#
- In Security, choose Universes and click New universe….
- Choose the Table: the fact table whose rows it limits.
- Choose the Privilege to which it applies.
- Type the Condition: an SQL condition of the engine, without
WHERE, on the table's columns. - Click Test so that the database checks the condition without running it.
- Read Whom it affects: the users who start seeing fewer rows and the affected documents.
- Click Create universe.


In the condition, ECenter puts the table's alias in the query in front of each column. If you need to put it elsewhere (inside a subquery, for example), type [@] where it goes. The two from the demonstration (PostgreSQL):
-- Customers of the North zone
"COD_ZONA" = 'N'
-- Sales reps of the North zone, with the alias where indicated
[@]."COD_ZONA" = 'N'
A table that inherits its master's universe does not need another one that says the same: the demonstration's invoices do not carry one, because their customers' reaches them, and one of their own would only repeat the condition in each query. A table without a relationship to the one that carries the zone would need it, with a subquery:
-- Invoices of customers of the North zone, if the invoices had no relationship with the customers
"COD_CLIENTE" IN (SELECT "COD_CLIENTE" FROM "COMERCIAL"."CLIENTES" WHERE "COD_ZONA" = 'N')
The condition can have up to 1024 characters and is written in the SQL of the connection's engine.
Change or delete a universe#
The list of universes is filtered by Table. When you choose one, its detail states the table, the privilege and the condition (“Whoever has “Zona Norte” only sees the rows of “Clientes” that meet the condition, and those of its detail tables”), with Test the condition.
- Change… opens the dialog to change the privilege or the condition. The table of a universe is not changed: for another one, delete it and create another. Click Save universe.
- Delete… first shows whom it affects: those who had the privilege start seeing all the rows.
Warning
A badly written universe can let rows be seen that should not be, or none. Always test it with Test and, afterwards, with a test user who has the privilege.