Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Multisession login
Multisession login [message #1798042] Sun, 11 November 2018 17:58 Go to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 47
Registered: August 2014
Member
Hello,

I was wandering how to implement multisession.. I am developing project management application. Users can log in, create tasks, projects, clients... Etc.

But I would like to allow clients of application to log in.

Clients are stored in seperate table - clients.

1. Can I have two logins in application, one for users and one for clients?

2. Can I have two login screens, one for users (default one) and create another for clients, for example URL: http://myapplocation.com/client/login?

If yes, how to accomplish this?

Thank you for answers
Re: Multisession login [message #1798078 is a reply to message #1798042] Mon, 12 November 2018 08:56 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
Luka Cavic wrote on Sun, 11 November 2018 12:58

1. Can I have two logins in application, one for users and one for clients?

2. Can I have two login screens, one for users (default one) and create another for clients, for example URL: http://myapplocation.com/client/login?


Just change your security filter accordingly, so that it checks both tables. Or maybe you can even recognize the user type from the username pattern? You may also have to adjust the "execLoad" part of the session (load data from one or the other table).

Both user types will use the same application, but Permissions control which elements are visible and available. Permissions are assigned to the user session by the "...AccessControlService". You can implement any logic you want to create java.security.Permission objects. In the specific elements (menus, outlines, pages, forms etc.) you can then check if the user has a specific permission using the ACCESS.check() helper.

Examples:
Page:
...
  @Override
  protected boolean execCalculateVisible() {
    return ACCESS.check(new ReadInternalDataPermission());
  }
...

Menu:
...
  @Override
  protected void execInitAction() {
    setVisibleGranted(ACCESS.check(new DeleteReportPermission());
  }
...


Regards,
Beat
Re: Multisession login [message #1798083 is a reply to message #1798078] Mon, 12 November 2018 09:14 Go to previous messageGo to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 47
Registered: August 2014
Member
Hi,

I know I can use client_someusername as pattern for login and to identify if login is for client or for user.

But I would like to have two login screens, one for users, one for clients? Is that possible?

myapplication.com/login
myapplication.com/client/login

With this approach I dont need patterns for username...

Thanks
Re: Multisession login [message #1798089 is a reply to message #1798083] Mon, 12 November 2018 09:58 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
Luka Cavic wrote on Mon, 12 November 2018 04:14
But I would like to have two login screens, one for users, one for clients? Is that possible?


Basically, yes, but it requires a lot of adjustments. You start by copying login.html and login.js, adjusting the auth path and then work your way through. The security filters have to be customized, because they all use /auth by default.

The easier way would probably be to copy login.html/login.js and adjust the java script code such that it automatically adds the "client_" prefix before submitting. This saves you from duplicating everything on the server side but does not show the "ugly" prefix to the user.

Another possibility would be to deploy a second *.ui.html application with a different configuration (but connecting to the same backend).

Regards,
Beat
Previous Topic:Some questions on hierarchical editable TablePage
Next Topic:java.lang.SecurityException: access denied (code 3a).
Goto Forum:
  


Current Time: Wed Apr 24 21:31:21 GMT 2024

Powered by FUDForum. Page generated in 0.03322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top