BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anand6666
Calcite | Level 5

Hi,

I have created new reports needed for client and linked it to the reports tab in SAS AML frontend V5.1 .

At present i am unable to find any conditions in Management console to disable the reports tab based on user capabilites.

Hence i am trying to create a logic wherein the session username/userid is captured in the first page before the SAS stored process of second page is loaded and then the username/userid is checked if belonging to a group with sufficient privileges and then the net set of stored process executed.

Now once the control is transferred to stored process, the username becomes admin username as we are implementing token authentication.

i want to know if i can get the session username/userid in the first page itself in html/javascript so that i get the logged in user details before it is converted into token.

Kindly help me

Do provide your insights.

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
PaulHomes
Rhodochrosite | Level 12

I am guessing you are checking the operating system user id? Perhaps you could show a code fragment where you are checking it. The operating system user id would be a shared identity when using SAS Token Authentication. When you say admin username are you talking about the spawned servers identity (often named sasrv)?

The SAS metadata identity should still be available to stored processes to query and use and should represent the identity of the person who authenticated to the SAS platform (rather than the operating system process owner of the SAS stored process server instance).

If you haven't already seen it, have a look in the SAS(R) 9.4 Stored Processes: Developer's Guide, Second Edition particularly the section Using Reserved Macro Variables. What do you get when you %put the following macro variables in your stored process?

  • &_AUTHTYP
  • &_METAPERSON
  • &_METAUSER
  • &_RMTUSER
  • &_SECUREUSERNAME
  • &_USERNAME

View solution in original post

3 REPLIES 3
LinusH
Tourmaline | Level 20

Not sure if I follow you exactly, and bear in mind that most SAS users doesn't use AML.

I don't know if it helps, but you can restrict access to Stored Process in metadata.

Data never sleeps
PaulHomes
Rhodochrosite | Level 12

I am guessing you are checking the operating system user id? Perhaps you could show a code fragment where you are checking it. The operating system user id would be a shared identity when using SAS Token Authentication. When you say admin username are you talking about the spawned servers identity (often named sasrv)?

The SAS metadata identity should still be available to stored processes to query and use and should represent the identity of the person who authenticated to the SAS platform (rather than the operating system process owner of the SAS stored process server instance).

If you haven't already seen it, have a look in the SAS(R) 9.4 Stored Processes: Developer's Guide, Second Edition particularly the section Using Reserved Macro Variables. What do you get when you %put the following macro variables in your stored process?

  • &_AUTHTYP
  • &_METAPERSON
  • &_METAUSER
  • &_RMTUSER
  • &_SECUREUSERNAME
  • &_USERNAME
Anand6666
Calcite | Level 5

Thank you Paul,

the macro variables

  • &_METAPERSON
  • &_METAUSER

served my purpose. I was able to get the logged in user details with these macros .

thanks Smiley Happy