Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Seperate entity by user (Table Row Ownership // Data - Segregation)
icon5.gif  Seperate entity by user (Table Row Ownership // Data - Segregation) [message #1760406] Wed, 26 April 2017 12:59 Go to next message
Eclipse UserFriend
I use (scout 6.0.200) on (eclipse neon.2 Release 4.6.2)

The idea:
I want to separet the entities by the user.
Only user1 can see the content from "A". The user "administrator" can see the content from "A plus B".


I have a lot of entities ...
* Punching
* Embossing
* etc.

The entities have their own TablePages.

Now i create an segretation-table on postgres (or similar)

user | stock
=========================================================
user1 | A
user2 | B
administrator | A + B



All entity-table have also a "stock-column":

punching_id | mass | etc. | stock
===================================================
1234 | 13g | ... | A
5678 | 12kg | ... | B


Now i want to adjust all select-statements to consider the stock per user.


And these are my two problems (also not the select-statement -> wich user is it) ...

(A)
I think i must create a login page (username / password) to identify the user. But .... how? There is such a thing in eclipse scout framework? Someone has a tip?

(B)
In wich segmentation can i save the logged user? (to access the name in the select-statements)
Re: Seperate entity by user (Table Row Ownership // Data - Segregation) [message #1760441 is a reply to message #1760406] Thu, 27 April 2017 05:26 Go to previous messageGo to next message
Eclipse UserFriend
I am not very knowledable on JPA as I am a very 'classic' guy making Stored Procedures for about everything Smile
But from it sounds like you needs to read about defining JPQL Joins so you can join your entities by user and ensure the right user can only see the records assigned/available to him.

Cheers,
Ries

Re: Seperate entity by user (Table Row Ownership // Data - Segregation) [message #1760591 is a reply to message #1760441] Fri, 28 April 2017 12:57 Go to previous messageGo to next message
Eclipse UserFriend
Hy Ries,

Thanks so lot ... I believe that select statement I get well ...

Can you help me with a login form? Or do you know where I can get further information? Specifically for the scout frame (scout 6.0.200)
Re: Seperate entity by user (Table Row Ownership // Data - Segregation) [message #1760597 is a reply to message #1760591] Fri, 28 April 2017 14:07 Go to previous messageGo to next message
Eclipse UserFriend
Hey,

I tell you honestly, I am currently just fooling around with the framework so I cannot give you solid advice.
I am playing with this : https://github.com/BSI-Business-Systems-Integration-AG/SpringBoot-and-EclipseScout and does show how to implement a login forum.
However,
from the looks of it you can implement any login system that you are familiar with, all it needs in the end is some valid session..

Ries
Re: Seperate entity by user (Table Row Ownership // Data - Segregation) [message #1760600 is a reply to message #1760597] Fri, 28 April 2017 14:34 Go to previous message
Eclipse UserFriend
Hy Ries,

Ok, tip top ... thank you anyway. Then I read the "SpringBoot"
Previous Topic:Sidenav widget?
Next Topic:[neon] FormData creation using maven build
Goto Forum:
  


Current Time: Mon Jun 16 19:16:39 EDT 2025

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

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

Back to the top