---
sourceDocument: Yokohama API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/api-reference

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideSecurityManager - Global

# GlideSecurityManager - Global {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The GlideSecurityManager API provides methods that enable you to retrieve a SecurityManager object and to check if the current user has access rights, both table-level and field-level, to a specified
GlideRecord table based on the configured Access Control Rules (ACLs).

## GlideSecurityManager - get() {#ariaid-title2}

Returns a SecurityManager object.
{#GSM-get__table_thk_nxd_d2c__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#GSM-get__table_thk_nxd_d2c} {#GSM-get__table_uhk_nxd_d2c__entry__2}

| Type | Description |
|-|-|
| Object | SecurityManager object. |
[Table 2. Returns]

{#GSM-get__table_uhk_nxd_d2c}  
The following code example shows how to call the GlideSecurityManager.get() method to obtain a GlideSecurityManager object that is then used by the GlideSecurityManager.hasRightsTo()
method.

    var sm = GlideSecurityManager.get();
    var grInc = new GlideRecord('incident');
    var path = 'record/incident/read';

    gs.info(sm.hasRightsTo(path, grInc));

Output:

    true

## GlideSecurityManager - hasRightsTo(String path_to_resource, Object context) {#ariaid-title3}

Indicates whether the current user has table-level access rights to a specified GlideRecord table based on the configured Access Control Rules (ACLs). This method evaluates all available ACLs for the specific
resource.
For additional information on ACLs, see [Access Controls Evaluation Order](https://developer.servicenow.com/dev.do#!/learn/learning-plans/yokohama/servicenow_application_developer/app_store_learnv2_securingapps_yokohama_access_controls_evaluation_order).
{#GSM-hasRightsTo_S_O__table_mvc_jxd_d2c__entry__3}

| Name | Type | Description |
|-|-|-|
| path_to_resource | String | Resource path to the GlideRecord table to check for access rights. For example: `record/incident/read` Format: \<type\>/\<name\>/\<operation\> * \<type\>: Type of resource. Valid values: Existing ACL types. Available from the drop-down choice list on the ACL form. * \<name\>: Name of the table to check. * \<operation\>: Name of the operation that you want to check access rights for. In this case "read". |
| context | Object | Optional. For table-level validation this field is not required. |
[Table 3. Parameters]

{#GSM-hasRightsTo_S_O__table_mvc_jxd_d2c} {#GSM-hasRightsTo_S_O__table_nvc_jxd_d2c__entry__2}

| Type | Description |
|-|-|
| Boolean | Flag that indicates whether the user's roles permit table-level reading of the specified table. Valid values: * true: Specified access is permitted. * false: Specified access isn't permitted. |
[Table 4. Returns]

{#GSM-hasRightsTo_S_O__table_nvc_jxd_d2c}  
The following code example shows how to use the hasRightsTo() method to check if the current user has table-level read rights to all records in the Incident \[incident\] table.

    var sm = GlideSecurityManager.get();
    var grInc = new GlideRecord('incident');
    var path = 'record/incident/read';

    gs.info(sm.hasRightsTo(path, grInc));

Output:

    false


