Profiles & Log In

Where should I start to check how to manage profiles with XOJO ? I would like to have different level of access to Windows and/or Database, based on a user log in (if possible, the network log in).

It is there a sample App that shows how to work with profiles ?

Gentlemen, any suggestion here ?

What OS platform?

Does the Windows Functionality Suite have anything you can use?

Thank you for the reply Paul. I am planning to deploy in Windows.

I did I search in the XOJO docs and did not not found easily a solution … I found UserName and Password to DB. But I am not sure that with these Properties I can handle what the specific User can access in the Database (for example, he can access a specific Table, but not others). Any suggestion here ?

Then I was thinking in have User access control in the Window level (that would act as the Front End to the DB). Some specific Windows the User would have access in the App, others not. But not sure how to do this or even if that’s the best practice.

Ah. I thought you were looking to access Microsoft Windows system profiles.

If you just want user access levels for your app, then that is something you will have to implement yourself. There are many ways to do that.

You could have a database table of users and access levels. When the user logs in, you check the table for their access level and then only show the parts of the UI that they are allowed to see.

Database servers use username/password combinations to connect to the server. Used in combinations with roles and permissions you can control the tables, data and actions they are allowed to see and use on the database. How that works is specific to the database server.

Thank you Paul. When you say that the user logs in, where do I read the log information ? Or is also something that I need to implement (the log in screen) ?

I am assuming here that I would be in a Windows network.

The Windows Functionality Suite https://github.com/arbp/WFS has methods for getting the current logged in user name
Can’t read their password (that would be a security hole)

:stuck_out_tongue:

You might want to have them use their database credentials to log in to your app. They enter their username and password, and you try to make a database connection. If it succeeds, they’re in. You would then keep a table keyed to the username for access permissions. The beauty is that you let the database handle the password encryption. You never have to store it.

Thank you. Is it possible to use this database credentials with the built in XOJO SQLite ?

No. Sqlite does not use user credentials. You’d have to handle it yourself.