How to hide menu entries depending on authorisation table?

If you synchronize applications into the genereated security table things work well. But the menu entries where the user has no access to is not hidden. How do I hide these, depending on the access table? (I mean the main entries, the subitems are hidden).

Re: How to hide menu entries depending on authorisation table?

Hello,

Try clearing your cache before accessing the system with another user, that has no access to those items.

regards,
Bernhard Bernsmann

Hello,
I have 2 questions:

  1. How do you clear the cache?
  2. Why is clearing the cache not automated ?

[QUOTE=javierx1;14800]Hello,
I have 2 questions:

  1. How do you clear the cache?
  2. Why is clearing the cache not automated ?[/QUOTE]

That would be your browser cache. Ctrl + shift + del on google chrome.

regards,
Bernhard Bernsmann

Can this be automated? maybe not but I would not have to remember Ctrl + shift + del command is a thought.

Javier,

That is actually up entirely to your browser. It has nothing to do with ScriptCase.

regards,
Bernhard Bernsmann

[QUOTE=bartho;9885]Hello,

Try clearing your cache before accessing the system with another user, that has no access to those items.

regards,
Bernhard Bernsmann[/QUOTE]

Bernhard,

A properly written application should not require you to clear the browser cache when switching users. The login process should clean up any session/cached information that may have been left from the previous user. Otherwise, this represents a security risk because the new user may not have access to entried (and we may not even want them to KNOW that there is an entry).

Nick

[QUOTE=vrtisworks;14930]Bernhard,

A properly written application should not require you to clear the browser cache when switching users. The login process should clean up any session/cached information that may have been left from the previous user. Otherwise, this represents a security risk because the new user may not have access to entried (and we may not even want them to KNOW that there is an entry).

Nick[/QUOTE]

Hello Nick,

I totally agree.

This issue happens when you are developing an application. Once you have you have deployed that application, the issue no longer happens.

regards,
Bernhard Bernsmann

So I am to assume this is fixed because not everyone uses Google Chrome and I am sure the command is not the same for all.

I am trying this code below on my menu app but nothing works!!!.

// None of this stuff below is working, it does nothing at all no errors and I can access anything with any user – >> can someone look and tell me what is wrong ??? !!!
if ([usr_login] == ‘admin’) {
// nothig
}
else {
sc_apl_status (‘item_21’, ‘off’);
sc_apl_status (‘item_29’, ‘off’);
}

if ([usr_login] == ‘admin’) {
// nothig
}
else {
sc_apl_status (‘lang_menu_security’, ‘off’);
sc_apl_status (‘Maintenance’, ‘off’);
}

if ([usr_login] == ‘admin’) {
// nothig
print "Administrator logged in : " .[usr_login]. “<br/>”;

}
else {
print "Non-Administrator logged in : " .[usr_login]. “<br/>”;
sc_menu_delete(‘item21’); // hide Maintenance
sc_menu_delete(‘item29’); // hide security
}

Try in the onLoad() event in the Menu, it is the only event I made it works.

I am yet able to get this to work. I just want to hide various menu items based upon the type/level of user logging in

Now looking at the above
sc_menu_delete(‘item21’); // hide Maintenance

Excuse the ignorance but the word “delete” in sc_menu_delete() , implies that that menu it will be Deleted (not hidden). And since you say must be run in production before you see it working, this can have some rather devastating affects.

Can some please comment, if this means delete/hide for that logged in user, or does it mean delete from the menu structure?

This does not work for me either.
Implemented the security module
choose the options in the groups/applications form but the menu options are still visible.
You can not click on them but nevertheless they are visible …

How to hide/delete them from the menu depending on the group?
I tried also in onLoad, onExecute in the menu itself but that does also nothing …

Pitty that some issues are on the forum for years but there does not seem to be a simple solution to them …

Hi Aducom.
I see exactly what you mean. Using the security module, menu entries are greyed out if not allowed.
Is there a set up in SC saying “grey out” or “hide” for not allowed menu entires?
Did you find anything?

I found out about the “sc_menu_delete” and “sc_menu_disable” macros.
Is there a way to “tell” Scriptcase to use one or the other within the Security module to hide menu items instead of only greying them?