I want to create multiple users in Oracle APEX so when they log in they can see and edit only reports and data they have created while they were logged in with their username. Administrator can menage with all data of all users, but users only their own data. How can that be done in APEX?
You could create an application item in Shared Components, and populate it with 'Y' when they are an administrator during either post-authentication process in your authentication scheme, or an after-authentication computation.
Then include the following in your where clauses.
where (created_by = :APP_USER or :F_ADMIN = 'Y')
First you need to be able to identify if an user is either an "End user" or an "Administrator". To do this so, I would recommend you to use your own authentication scheme (http://www.developapex.com/2018/04/custom-authentication-scheme-on-oracle.html) or you could adapt your APEX Access Control which I'm assuming you're using.
The last option is more advanced and you can use this link to start with: https://blogs.oracle.com/apex/custom-authentication-and-authorization-using-built-in-apex-access-control-a-how-to
Once you can identify the user's information, you can modify your SQL logic to add a WHERE clause which will filter to return only rows that were created by a specific user (:APP_USER returns the current user) or return every row if it's an administrator. Exactly as #Scott said.
Related
I am new to oracle apex and having trouble finding resources on how to do it. Any help would be really appreciated.
If you want to display the same page differently to each user, you'd then use the "Server-side condition" whose type is a function that returns Boolean, e.g.
return f_app_type(:APP_USER) in ('MANAGER', 'ANALYST');
which would render that element (region, item, whatever) only to users who are either managers or analysts, while other users wouldn't see it.
Or, if you wanted to navigate users to different pages, then you could use a branch. As it also offers the Server-side condition, you'd basically use the same principle as above and redirect each user to their own page.
I am new to PowerBI and I have a project where I store my data on MySQL( or I will use MSSQL) server. Each user has a defined ID. Is it possible to create a user login or something like that that would show reports for different users?
Login screen with powerBI shortcode will be on my website and I would like to show powerBi report by logged user. Report screen will be the same every time, but with different numbers for different user.
I am sorry for this question, but I am new to powerBI. Is it even possible to create something like this?
Thanks for any help.
You can take a look at Row-level security.
Row-level security (RLS) allows you to restrict logged in user's access to report's data, i.e. you can show different part of your data based on logged in user.
You can setup RLS in Power BI Desktop. You can create different roles that can be assigned by generating the embed token while embedding.
Refer docs: https://learn.microsoft.com/en-us/power-bi/admin/service-admin-rls
While embedding, generate embed token based on the user who has logged in and assign the roles to it. Refer docs: https://learn.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security
Currently I am using database accounts as my authentication schema and as a result anyone with a valid database account may login. I would like this to be more restrictive. All my users have a prefix in their user account names which specifies the group they belong to. An example would be dev_john, qa_cindy, etc. I would only like a specific group with a certain prefix in their username to be able to login. Database accounts seems to just allow all. I see there is a custom auth, but I am unsure how to get databse users from here.
I think the problem with this would be how to check the Oracle users' passwords from within your custom authentication function. Hopefully there is no way you can find out their passwords to check them, so how can you establish they typed the correct password? Maybe there is a way, I don't know.
However, perhaps more appropriate for this rule would be an authorization scheme. The user can log in, but if their username fails your authorization scheme test, they can't access the application. The test would be a PL/SQL expression like:
:APP_USER like 'QA%' or :APP_USER like 'TEST%'
When user DEV_JOHN logs in, the log in succeeds but all they get is a page saying e.g.
Only QA and TEST users are allowed to access this system.
I have an application which involves large number of users.
among those, some are staff members.
My problem
When a user from a certain group let say A logs in, it takes 5 minute to see the admin
screen (index page). I want to fix this problem.So the question is ,
What is the sql query when a user from a certain group logs in the admin of the project.
I know how to see query
str(MyModel.objects.filter(name="my name").query)
but again not getting how to generate the query for that case
Install Django Debug Toolbar and you will see all queries executed during user login.
I have an application written in Oracle Apex 4.2
Different users have access to different pages. Apex's built in Access Control function ( ADMIN, EDIT, VIEW) takes care of what pages different users can see.
A separate requirement though is that some users can see certain pages and not edit them and other users can edit those pages.
I know that at the item level there is a Read Only option. I can hard code a user name ie
:APP_USER like 'Betty Boop%'
How can I set an item to be read only based on the Access Control group that a user belongs to (ADMIN,EDIT,VIEW)
I know that there is a utility: APEX_UTIL.CURRENT_USER_IN_GROUP
but if I do something like READ ONLY PL/SQL Expression
APEX_UTIL.CURRENT_USER_IN_GROUP('VIEW')
It doesn't do anything.
It seems that APEX_UTIL.CURRENT_USER_IN_GROUP doesn't know that the groups created by Apex Access control are groups - I need to code something? Create a function? Create a group table?
I'm not understanding how to do this
thanks
To use APEX_UTIL.CURRENT_USER_IN_GROUP you need to create user group(s) as an workspace administrator first: Administration->Manage Users and Groups->Groups->Create User Group.
Then you need to assign the group(s) to your application users: Groups->User Group Assigments. You should read documentation for more details.
And, after that you will be able to check an assignment of particular group to current application user with the APEX_UTIL.CURRENT_USER_IN_GROUP function.