You do not have permission to view this page

#1

I’ve a user that can access a Dashboard page when accessing from localhost (i.e. using the c3ui-node-server). The AdminGroup he’s part of is added to the Dashboard’s PageGroup.
But when I try to access the same page from the Vanity url I see this message:

Unauthorized
You do not have permission to view this page.

Any idea how to fix this?

0 Likes

#2

Can you try the following things and let me know if the two results are the same? Thank you.

  1. In your application page’s browser developer tools’ console, try this “env.get(‘session’).get(‘user’).get(‘permissions’)”
  2. In your target server static console, try this “UIMetadata.init().pageGroups”

And if they are the same, can you try to find out if there is the Dashboard page id inside?
If there is Dashboard page id inside of both results. Can you try UIConfig.fetch(), and let me know the result?

Thank you.

0 Likes

#3
  1. env.get('session').get('user').get('permissions') from app page, I see:
    Collection {instanceId: 1524, state: "loaded", _config: {…}, initialized: true, map: {…}}
  2. UIMetadata.init().pageGroups from static/console, I see an array of 115 page groups, including the dashboard page
0 Likes

#4

What about UIConfig.fetch() in static console?

0 Likes

#5

with UIConfig.fetch() I all applications plus the environments configs, something like this:

applications: [ ... ]
 0: { ... }
 id: AppInQuestion
 1: { ... }
 id: Enterprise
 2: { ... }
 id: Consip
 3: { ... }
 id: C3Tools
 4: { ... }
 id: ContentManager
 5: { ... }
 id: UserAdministration
 environments: [ ... ]
 0: { ... }
 id: development
 session: { ... }
 cache: LocalStorage
 site: { ... }
 renderTo: body
 localeSwitcher: true
 connection: { ... }
 waitWarningTime: 120000
 timeoutTime: 600000
 cache: true
 loggerConfig: { ... }
 remoteLogger: true
 localLoggerLevel: WARN
 locales: [ ... ]
 0: { ... }
 id: en
 name: English
 1: { ... }
 id: it
 name: Italiano
 locale: it
 designer: false
 c3Tools: true
 acl: true
 1: { ... }
 id: production
 session: { ... }
 cache: LocalStorage
 site: { ... }
 renderTo: body
 localeSwitcher: true
 connection: { ... }
 waitWarningTime: 120000
 timeoutTime: 600000
 cache: true
 loggerConfig: { ... }
 remoteLogger: true
 localLoggerLevel: WARN
 locales: [ ... ]
 0: { ... }
 id: en
 name: English
 1: { ... }
 id: it
 name: Italiano
 locale: it
 designer: true
 c3Tools: true
 acl: true
 id: engie-claradomus
 version: 14
 meta: { ... }
 tenantTagId: 52
 tenant: engie-claradomus
 tag: prod
 created: 2017-04-03T17:05:13.000Z
 createdBy: authorizer
 updated: 2018-03-23T15:54:36.000Z
 updatedBy: authorizer
 timestamp: 2018-03-23T15:54:36.000Z
0 Likes

#6

Do you mind to double check if you changed local c3ui.json file? And check if acl in c3ui.json are set to true?

Thanks.

0 Likes

#7

I didn’t change the c3ui.json except adding the app AppInQuestion, the file is under seed/Enterprise/UIConfig.

0 Likes

#8

Ok, thank you.
Can you try env.get(‘session’).get(‘user’).get(‘permissions’).get(‘items’) in your deployed application environment. And check if the page id is inside?

Thank you.

0 Likes

#9

Yes, I see dashboard page:

Record
initialized:true
instanceId:509
state:"modified"
_config:
initializers: Holder {}
lazyTransform: Holder {}
needsTransform: Holder {data: false, changes: true}
raw: Holder {id: "AppInQuestion.Dashboard", version: 6, name: "AppInQuestion.Dashboard", meta: {…}, acl: Array(1), …}
serializers: Holder {}
transformers: Holder {}
updaters: Holder {}
values: Holder {id: "AppInQuestion.Dashboard", version: 6, name: "AppInQuestion.Dashboard", meta: {…}, acl: Array(1), …}
__proto__
:
Object
__proto__
:
C3.Class
0 Likes

#10

That is weird, do you mind to share the stage environment with me so that I can test it a little.

The next step I would like to do is to debug the compiled file in browser to check why we invalidate this application page.

Thanks.

1 Like

#11

After investigation, it seems like the default page for default application is named as a different page other then the one setup in the PageGroups.

1 Like