Filter data according to logged user, without using mendix security

0
I am building an ecommerce application, I have created three entites, Registration, Login and Product. Registration and Login entities are used for authentication. I want to filter product wishlist page according to logged in user. I do not want to use mendix inbuilt security and my app security is ‘Off’. Please help.   I have added this entity as shown to store list of products of a wishlist of a particular logged in user. Is this correct approach? How to proceed?  
asked
4 answers
1

Not using the mendix build in security??????

WHY?

If you want to allow anonymous users, to use the app anonymous. Just turn on anonymous users. > project > security > anonymous users.

 

Your own login entity makes 0 to nothing sense and will lead to a very unsecure app. Just.Don't.Do.That

answered
1

Retrieve User role from System.Userrole entity Name should be one of the UserRoles present in the project securit.

 

Then change the Account object to associate the role.

answered
0

Hi Arpita,

You can associate the Product entity with Login and in product page use a dataview of Login and get associated Product data.

I am guessing the Product entity will contain all the products and User can add them to their cart, if one user changes the IsWishlist to true it will be changed for all the users as same product is associated with different users.

To avoid that use a different entity to store the list of product for different users.

 

Edited: You can turn on the Mendix security and use default Administration/Account Entity and associate it with the Registration entity to extend its functionality.

Guessing that Product contain all the product list, so each account should have their own Shopping list that contain Productname/ID or you can associate it with the Product Entity as well.

Also turn on System members in entities (Store Owner, Store CreatedDate etc.), then you can filter product list by [CurrentUser] parameter as well.

 

answered
0

Hi @Prashant Singh, 

I tried implementing your steps, added a form login templete for signup page with data view entity as “Account”. Then on clicking signup button, the following microflow will be executed. I have also added a commit registration in SaveNewAccount(copy) as you said. I am unable to sign up the user.

 

 

 

 

answered