Omnis user privileges

Franco Maregotto franco at hotelaqua.it
Thu Jan 12 13:50:14 UTC 2023


As many suggested their own way, I’ll give my 2 cents too, aware that’s not the best solution but just one more.
When user logins, in user table I have a char field with a long serie of 1 and 0. The browser window (or initial toolbar) will have its construct (or $doInit) method calling a “setButtons” method that enable or disable buttons: i.e.
If mid(user_permission,1,1)
  enable/show etc
Else
  Disable/hide etc
End if
All other windows/menus/etc behave the same way, so the only issue is to be aware of the “position” they must get in the user_permission (something that I store in a comment line in $construct.)
As I said, just my 2 cents
Ciao 
Franco

Inviato da iPhone
(Franco Maregotto)

> Il giorno 12 gen 2023, alle ore 14:05, Phil (OmnisList) <phil at pgpotter.co.uk> ha scritto:
> 
> Xavier,
> 
> As others have mentioned, there are varying ways to do this...
> 
> I'll try to summarize what we do, to offer some different views on a solution.
> 
> So for us, we have users login, which is linked to a profile...
> The Profile is limited to what it can do...
> 
> Which windows it can access, and when in a window, whether it can edit, delete or create new records...Is all set in the profile.
> 
> We have a toolbar to get access to various windows, and also the buttons to create, edit, delete etc.
> 
> This leaves us with total control in our toolbar that we created, which is an Omnis sub window with page panes used as button ribbons, so nothing needs to be added to the windows directly...
> 
> The Buttons are created programmatically in the first place, which is stored in a schema, which can then be used to setup a permission profile.
> 
> We've used this in a number of projects, so we know it works well, and easily changes to the new program.
> 
> regards
> Phil Potter
> Based in Chester in the UK.
> 
>> On 12/01/2023 11:58, IT wrote:
>> Hi all,
>> 
>> I have not implemented a good way to limit user access to my app because it was based on legacy omnis users privileges (12345678)
>> and is very limited and hardcoded in the library.
>> 
>> Now I want to redo how user are allowed to access to menus and buttons in my Omnis library.
>> 
>> If anyone wants to share any insight into how they implemented user access, they're welcome.
>> 
>> Regards
>> 
>> Xavier
>> _____________________________________________________________
>> Manage your list subscriptions athttps://lists.omnis-dev.com
>> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com  
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list