# View Permission Roles

**URL:** <https://forum.inductiveautomation.com/t/view-permission-roles/38062>\
**Category:** Ignition\
**Created:** [August 25, 2020, 5:16pm UTC](https://forum.inductiveautomation.com/t/view-permission-roles/38062 "2020-08-25T17:16:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad.barbin](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@brad.barbin](https://forum.inductiveautomation.com/u/brad.barbin)\
**Post date:** [August 25, 2020, 5:16pm UTC](https://forum.inductiveautomation.com/t/view-permission-roles/38062/1 "2020-08-25T17:16:57Z")

</div>

8.0.15 using AD/Database Hybrid

Expected behavior: when I set the view permission for a specific role, a user that is logged in that has that role should be able to view the page

Actual behavior: the page gives a “you do not have permisison to load this view” message.

I can verify that the correct role (PRG) is returning from the database by using this change script on the session user property:

```auto
system.tag.writeBlocking(['[Default]Test'],[self.props.auth.user.roles[0]])

```

My view is permissions are set like this.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67b99344955daec21144fcc6c6e1b472621b98da.png)

One thing to note is that I manually added the roles through the Gateway \> Config \> Security Levels interface. It seems like those would be auto-populated. Could someone please explain the mechanics of role-based permissions? I see that there are two roles objects. One in session.auth.user, and another in session.auth.securityLevels. How are they related? Am I missing something?

Here is the result from the test login:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/f/3fdeb056da23ca2f157240241feaf3b47ef7457c.png)

---

<div class="post-metadata">

**Author:** ![brad.barbin](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@brad.barbin](https://forum.inductiveautomation.com/u/brad.barbin)\
**Post date:** [August 25, 2020, 7:21pm UTC](https://forum.inductiveautomation.com/t/view-permission-roles/38062/2 "2020-08-25T19:21:46Z")

</div>

It turns out, this was just a white space issue. Sorry guys. Hope this is helpful to someone at some point. Trimming the white space from the role from the database did the trick.
