How to differ between Active Directory and OutSystems Users ?

How to differ between Active Directory and OutSystems Users ?

  

Dears,
        I have an application which use active directory and outsystems users, and they are both inserted in the Users Outsystems table.

now I'm having Issue that If I logged in form the Admin(ActiveDirectory) Login Page using a public user, the user passes the login function but raise "no permission exception". 

The question here is how to differ between the active directory users and regular OutSystems Users while they are running on the same tenant and the same Users Entity.

Thanks in advance, 

Best Regards
Mohamed AlMokadem

I think you will have to assign roles to them during the login process. If a user is logged in from the AD you could add some extra roles to it, then inside the application you could check if the user has that specific role.

Hi Mohamed,

The active directory users in the User entity have the password attribute empty. Maybe you can check by that. Don't know if it's the best place...

Cheers,

José

Hi Mates,

   I've got an idea that I want to share with you, I will add a column in the Users table (IsActiveDirectory) {boolean} and will check it in the login process in the both login pages. 


Cheers ,
Mohamed AlMokadem

Solution

Hi Mohamed,

You can not alter the User Entity. You can create another Entity that extends the User entity (with the Id having a data type of User Identifier).

Also, the login process is inside the Users module. You would have to clone it and set a new User provider and I don't know if you want to go that route...

Cheers,

José

Solution

José Costa wrote:

Hi Mohamed,

You can not alter the User Entity. You can create another Entity that extends the User entity (with the Id having a data type of User Identifier).

Also, the login process is inside the Users module. You would have to clone it and set a new User provider and I don't know if you want to go that route...

Cheers,

José

Hi Jose,

You are right I can't edit Users table as I see, I had already another table but was for public users only added the Admin to it and added a column IsAdmin to it. 

Cheers,

Mohamed AlMokadem