Hi!
I am trying to achieve the following behaviour in the WinCC OA. When user logs in, all pages and device control popups are available to him. When user logs out (either manually or through the timeout) the system goes to "no user".
What it means though is I can't even navigate through the pages any more. Is there any way to make it so that navigation is still available even when no one is logged in?
Default user?
- aorange
- Posts:147
- Joined: Thu Nov 04, 2010 10:07 am
Re: Default user?
What you describe sounds like the vanilla functionality of WinCC-OA, have you by any chance disabled/deleted the guest account?
- n_lev
- Posts:73
- Joined: Tue May 28, 2013 2:24 am
Re: Default user?
Hi Jonathan,
I don't believe I disabled it. I can actually login as "guest" with empty password.
I guess my issue is that when the system auto logs out, it does not revert to "guest" but goes to nothing. Is there anyway to make it go to guest instead? The only thing I can think of right now is write a script that log in as guest on the logout event, but this seems pretty weird way of doing it
I don't believe I disabled it. I can actually login as "guest" with empty password.
I guess my issue is that when the system auto logs out, it does not revert to "guest" but goes to nothing. Is there anyway to make it go to guest instead? The only thing I can think of right now is write a script that log in as guest on the logout event, but this seems pretty weird way of doing it
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Default user?
Hello,
there is no possibility to define a default-user when the automatic logout is made.
Which actions can be started, even if no user is logged in, depends on the implementation of the application.
With the function getUserPermission() you can check if the current user has sufficient permissions to start an action. If this function is not used every user should be able to start an action, like switching a panel.
Be aware that you'll not be able to track commands or an operation when no user is logged in. The datapoint-elements set while no user is logged in will not have the information who has set them.
Therefore it's the common way to force the user to make a login before he can operate the user-interface.
Best Regards
Leopold Knipp
Senior Support Specialist
there is no possibility to define a default-user when the automatic logout is made.
Which actions can be started, even if no user is logged in, depends on the implementation of the application.
With the function getUserPermission() you can check if the current user has sufficient permissions to start an action. If this function is not used every user should be able to start an action, like switching a panel.
Be aware that you'll not be able to track commands or an operation when no user is logged in. The datapoint-elements set while no user is logged in will not have the information who has set them.
Therefore it's the common way to force the user to make a login before he can operate the user-interface.
Best Regards
Leopold Knipp
Senior Support Specialist
- n_lev
- Posts:73
- Joined: Tue May 28, 2013 2:24 am
Re: Default user?
Hi Leopold,
It all makes sense, I agree. The one annoying thing is that when no one is logged in I always get a popup saying the page that is currently open is unavailable to the current user. Can I get rid of that one somehow?
It all makes sense, I agree. The one annoying thing is that when no one is logged in I always get a popup saying the page that is currently open is unavailable to the current user. Can I get rid of that one somehow?
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Default user?
I believe that when there is a 'inactivity.ctl' defined it will be executed instead of the defined inactivity action. This way you can make a 'relogin as guest' inactivity action. The manual logout should also changed, so it logs in as a guest.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Default user?
Hello,
I made a test using an inactivity.ctl.
If this script is defined at the scripts of your project the commands from this script are executed when the inactivity-timeout is reached. The action you have chosen at the panel will not be executed when the script is existing. All necessary commands have to implemented in the script.
The script is not called when you have defined an automatic logout after a given time. Then only the auto-logout will be made.
Best Regards
Leopold Knipp
Senior Support Specialist
I made a test using an inactivity.ctl.
If this script is defined at the scripts of your project the commands from this script are executed when the inactivity-timeout is reached. The action you have chosen at the panel will not be executed when the script is existing. All necessary commands have to implemented in the script.
The script is not called when you have defined an automatic logout after a given time. Then only the auto-logout will be made.
Best Regards
Leopold Knipp
Senior Support Specialist
- n_lev
- Posts:73
- Joined: Tue May 28, 2013 2:24 am
Re: Default user?
Thanks for your help, guys
I've tried adding the "inactivity.ctl" to my scripts folder and it worked. Well, sort of. It works when I run ui on the server or on the client (remote ui). But it doesn't work on the web-client for some reason (still standard behaviour executes instead of my "inactivity.ctl"). I achieved what I needed in another way (re-login when _Ui_x.UserName changes to empty)
Where is the actual autologout script? I can't find what actually gets executed and triggered when your inactivity timeout expires. Also, can't find anything on "inactivity.ctl" in the help system.
I've tried adding the "inactivity.ctl" to my scripts folder and it worked. Well, sort of. It works when I run ui on the server or on the client (remote ui). But it doesn't work on the web-client for some reason (still standard behaviour executes instead of my "inactivity.ctl"). I achieved what I needed in another way (re-login when _Ui_x.UserName changes to empty)
Where is the actual autologout script? I can't find what actually gets executed and triggered when your inactivity timeout expires. Also, can't find anything on "inactivity.ctl" in the help system.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Default user?
Hello,
the Web-client is loading necessary files on demand from the server and copies them to the local cache-folder.
The inactivity-function at the UI only checks if the file exists at the local project directory. To be able to use the same functionality on the web-client computer you would have to copy the file manually to the web-client project.
If the timeout for the inactivity reached for the dp-element _Ui_X.Inactivity.Commit the value true/1 is set. Maybe you could use a dpConnect() on this dp-element to realize the requested functionality.
There is no autologout-script available. The auto-logout functionality is implemented in the user-interface.
Best Regards
Leopold Knipp
Senior Support Specialist
the Web-client is loading necessary files on demand from the server and copies them to the local cache-folder.
The inactivity-function at the UI only checks if the file exists at the local project directory. To be able to use the same functionality on the web-client computer you would have to copy the file manually to the web-client project.
If the timeout for the inactivity reached for the dp-element _Ui_X.Inactivity.Commit the value true/1 is set. Maybe you could use a dpConnect() on this dp-element to realize the requested functionality.
There is no autologout-script available. The auto-logout functionality is implemented in the user-interface.
Best Regards
Leopold Knipp
Senior Support Specialist
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Default user?
The demand for the WebClient is determined by the 'getPath' function. When you add 'getPath(SCRIPTS_REL_PATH, "inactivity.ctl")' to your login panel, the file will be copied to your local cache-directory. But it will be too late, because the UI has already tried to read the script. So after your restart the webclient, it should work.
If you want that the webclient automatically tries to get the file from the server, you should send a support request to the official support.
If you want that the webclient automatically tries to get the file from the server, you should send a support request to the official support.