Default Site and Building Code VPA Restrictions in the Archibus Users Table

Using the Default VPA Restrictions

Most sites establish VPA restrictions based on geographic responsibilities. For this usage, Archibus has a short-hand for specifying the VPA restriction. In the Archibus Users table, you enter the comma-delimited list of Building Codes or Site Codes to which each user should have access.

This feature is useful for implementations that have dozens, or even hundreds, of sites and buildings for which to manage data access.

Default VPA Examples

For instance, if you specify that UserA has access to the HQ and JFK buildings, the Archibus program restricts the Buildings table and all tables that validate on the Buildings table.

The table below shows some typical Default VPA restrictions.

User

Building Code List

Site Code List

Effect

UserA

HQ

Grants access to building HQ data.

UserB

JFK

Grants access to building JFK data.

UserC

HQ, JFK

Grants access to either building HQ or JFK data.

UserD

HQ%

Grants access to all buildings that are prefixed with ‘HQ’, that is, all records that are LIKE ‘HQ%’

UserE

NULL,HQ

Grants access to all records that have no Building Code or that are in building HQ.

UserF

NULL;HQ%,JFK,I204

Grants access to blank records, records LIKE HQ% or in JFK or in I204.

UserG

JFK

Grants access to records assigned to site JFK.

UserH

JFK-A

JFK

Grants access to records assigned to building ‘JFK-A’ and site ‘JFK’.

UserI

<none>

<none>

No VPA in effect. Grants access to everything.

Default VPA Rules

When you enter values in the Building Code List or Site Code List of the Archibus Users table, the program uses the following rules in establishing the VPA restriction:

  • List Items . List Items add a WHERE IN clause:
    'HQ' adds the clause ( bl_id IN ( 'HQ' ))
    'JFK-A, JFK-B' will add the clause ( bl_id IN ( 'JFK-A', 'JFK-B' ))
  • Nulls . NULL adds an IS NULL clause:
    NULL adds the clause ( bl_id IS NULL )
  • Wildcards . Items with wildcards will add a LIKE clause:
    HQ% adds the clause ( bl_id LIKE 'HQ%')
  • Compound Conditions . Multiple conditions will be OR’ed together:
    'NULL,HQ%, JFK-A, JFK-B'
    adds the clause
    (( bl_id IS NULL ) OR ( bl_id LIKE 'HQ%') OR ( bl_id IN ( 'JFK-A', 'JFK-B' )))
  • Table and Field Names . Table and field names are replaced as appropriate for the table. For instance, the validated "Building Code" fields in the Move Orders table are mo.bl_id_from and mo.bl_id_to .
  • Building and Site Restrictions . Restrictions on the Building Code List and restrictions on the Site Code List are AND’ed together. This is because they are actually separate VPA restrictions, and all separate VPA restrictions are AND’ed.
  • Default VPA Details -- The default VPA restriction establishes a validating table VPA on the Buildings table and/or on the Sites table. The default VPA is equivalent to specifying a VPA Restriction in the Archibus Roles table in the form:

<restriction type="forValidatedTables" sql="#ASQL_VPAField() LIKE 'HQ%'"> <title translatable="true">Restrict access to Buildings Data </title> <validatingTable name="bl"/> </restriction >

for sites, the restriction is in the form:

<restriction type="forValidatedTables"
sql="#ASQL_VPAField()     LIKE 'JFK%'"
<title translatable="true">Restrict access to Site    Data</title>
<validatingTable name="site"/>
</restriction>