User Role permission

Ask your questions here.
User avatar
facciolini
Posts: 73
Joined: 04 Nov 2018, 14:39
Name: Rosetta Facciolini
Location: Treviso

User Role permission

Post by facciolini »

Good morning everyone,
how to give "Manager" role user permission to view and edit:
- entityes templates
- public forms
- modules "users alerts"

Thanks to those who can help me
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: User Role permission

Post by support »

There is no configuration for this. Only admin can configure these things.
Paullm
Posts: 161
Joined: 11 Dec 2020, 03:44
Name: Paul M.
Location: Dallas, Texas

Re: User Role permission

Post by Paullm »

Not needed in my particular situation, but I could see the merit in having this capability ... but as part of a "Developer" role; not "Manager".

It's probably far too complex to retro-fit, but it would be very flexible to have the various Administration functions accessible by role. Therefore, a "Developer" is able to make SOME system changes and a "Manager" able to add/manage "Users".
Last edited by Paullm on 10 Mar 2022, 15:41, edited 3 times in total.
User avatar
facciolini
Posts: 73
Joined: 04 Nov 2018, 14:39
Name: Rosetta Facciolini
Location: Treviso

Re: User Role permission

Post by facciolini »

Yess Paullm
it would really be very useful, especially when developing for a client.
Sergey if it were possible, I would make a donation
techtr
Posts: 176
Joined: 23 Nov 2021, 04:48
Name: Zach S.
Location: United States

Re: User Role permission

Post by techtr »

I was thinking more like a "Super Admin" and one or several Admin's as developers.
Paullm
Posts: 161
Joined: 11 Dec 2020, 03:44
Name: Paul M.
Location: Dallas, Texas

Re: User Role permission

Post by Paullm »

If admin functions were assignable to roles, every Ruko instance could be configured as desired ... the highest level administrative function, of course, being "God". :roll:
Last edited by Paullm on 10 Mar 2022, 11:54, edited 1 time in total.
nruslan2
Posts: 104
Joined: 03 Apr 2021, 23:37
Name: Ruslan
Location: RF

Re: User Role permission

Post by nruslan2 »

User avatar
facciolini
Posts: 73
Joined: 04 Nov 2018, 14:39
Name: Rosetta Facciolini
Location: Treviso

Re: User Role permission

Post by facciolini »

Hi nruslan2,
I prefer the official Ruko extension, for the stability of the structure, especially for such a delicate thing, linked to privacy ... Thanks for the proposal
Paullm
Posts: 161
Joined: 11 Dec 2020, 03:44
Name: Paul M.
Location: Dallas, Texas

Re: User Role permission

Post by Paullm »

I agree. Also, paid-improvement #113 appears to only relate to Global Lists; not each administrative function.
pepe
Sponsor
Sponsor
Posts: 556
Joined: 25 Aug 2015, 21:35
Name: Pepe
Location: Graz, Austria
Contact:

Re: User Role permission

Post by pepe »

Hi,
STEP 1: you could use the sort order field in User Access groups to setup a hierarchy. For example:
- 100 = supper admin
- 90 = site admin
- 80 = management
- 70 = project manager
- 60 = client
- and so on ...

STEP 2: in entity Users, create a field of type MySQL Query to store that store the related hierarchical level value with the user:
CASE
WHEN [6]=0 THEN 100
ELSE (SELECT app_access_groups.sort_order FROM app_access_groups WHERE app_access_groups.id=[6] LIMIT 1)
END

You need to take care of super admin. Super admin does not have entry in table for User Access Groups. Now, you could use the access level values in various entities for permitting edit, view, hide fields, etc.

STEP 3: Push the $app_user array -> JS using code like this:
<script type='text/javascript'>
<?php
$varPHP = array('abc','def','ghi');
$jsonPHP = json_encode($varPHP);
echo "var varJS= ". $jsonPHP . ";\n";
?>
</script>
This has been posted before @ viewtopic.php?f=2&t=2068&p=9034&hilit=app_user#p9034
Then you can use this information in forms to monitor user access.

Hope this is of some help.
Regards, Pepe
Post Reply