on 07-21-2016 9:40 AM
Hi Colleagues,
I am developing a NodeJS application on XS Advanced, and I am creating scopes and role templates for my application users. There are two type of roles UserAdmin and User. Is there a way to get which scopes or role templates the user has from the session ? And if so how can I get this information ?
Thank you,
Best Regards,
Shady
I'd recommend assigning the scopes to routes/HTTP verbs in the xs-app.json of the web module of your application whenever possible. This allows the checks to take place without application coding.
If you need the scopes within Node.js, then use the sap-xssec module.
This module has functions like checkScope.
checks a scope that is published by an application.
Parameters:
scope
... the scope whose existence is checked against the available scopes of the current user. Here, the prefix is required, thus the scope string is "globally unique".true
if the scope is contained in the user's scopes, false
otherwiseYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.