Safran / RoPA

Version web du registre des activités de traitement à installer sur un serveur. | Web version of the record of processing activities to install on a server.
GNU General Public License v3.0
32 stars 12 forks source link

Add a screen for managing users #2

Open leolivier opened 5 years ago

leolivier commented 5 years ago

Hi I didn't find any way to create new users in the tool administration. Could you please add one (or indicate how you proceed to create users)?

SafranCode commented 5 years ago

Hi, Currently, this feature is not available. We use SAMLv2/LDAP authentication to create accounts. We didn't want admin to be able to add "local" users. You can add multiple users directly in the database with an insert. You can add a single user with command lines using php artisan tinker. Then enter the following lines to create a user and edit its variables: $user = new User; $user->username = 'username'; $user->first_name = 'firstname'; $user->last_name = 'lastname'; $user->email = 'email'; $user->role = 'admin'; $user->password = bcrypt('password'); $user->company_id = Company::where('name', 'Company')->first()->id; $user->active = true; $user->save(); exit​

The feature could be added in the administration panel (set the first name, last name, email, company and send an email with a random password).

leolivier commented 5 years ago

Hi It would be ok for us to use SAMLv2/LDAP but is there some documentation on the needed configuration?

alainw68 commented 5 years ago

Hi,

there is just a small error for the manual creation of a user : $user->first_name ='firstname'; $user->last_name ='lastname';

SafranCode commented 5 years ago

Hello @leolivier, The SAMLv2 connection is using the aacotroneo/laravel-saml2 library. We are editing the following files to match our configuration :

We are replacing these specific files and the images following a pull.

I leave the issue opened because we may add the feature for managing users.

leolivier commented 5 years ago

Alright, thank you for the explanation, we'll try this