I found some problems with user permissions.
Version Info: Directus version and branch (Or commit hash): Docker File getdirectus/directus 6.4
PHP version: 7.1.17
MySQL version: 5.5
Web server: (Ex. Apache, nginx or IIS?)
OS name and version: centOS 7
Expected Behavior:
I expect that a user of a group can only see their own records in the tables, according to group permissions.
User A of group 1 can not see records of table X created by user B of
group 2.
Inoltre l'utente A del gruppo 1 non può vedere i record della tabella
X creati dall'utente B del gruppo 1
Actual Behaviour:
User A of group 1 sees the records of table X created by user B of
group 2.
User A of group 1 sees the records of table X created by user B of
group 1
Screenshots
Screenshots of group A permissions on 3 tables, in my case the table activity = X.
The same permissions have been set for group B
I solved by setting the 'User Created' field for the tables I want to filter by user
Related
Is there a way to find all user accounts in Oracle which have been created by me?
The SELECT * FROM ALL_USERS; returns all users in Oracle, but there seems to be no way of defining the 'owner' of the account (ORC_SYS would be nice) so I can add a clause like
'WHERE OWNER !+ 'ORC_SYS' or something.
Thanks in advance
KS
If its only the users created by oracle at install time you want to exclude you can properly do it filtering on user_id. Normally these users will have the lowest numbers:
Ajust the 35 to your installation.
Select * from dba_users where user_id > 35;
And if you are running 12c or above there is a column "Oracle_maintained" telling you if it is an oracle created user.
Select * from dba_users where oracle_maintained = 'N';
If you have access to dba_users and your Oracle's version is 12.1 and above, you can filter by oracle_maintained column.
Otherwise, there is no "official" way to distinguish between oracle internal users and your own.
There are some indirect ways, though:
Filter by all_users.created column. Mostly, internal users are created when the database is created, so your users will be after this date. You may find the database creation time in v$database.created .
Filter by all_users.user_id. As above, mostly, internal users are created when the database is created, so they get low user_id. There are some exceptions for several users like SYSBACKUP, SYSDG.
Both ways may produce incorrect results when internal users are created much later than the database creation - for example when an Oracle Option is reinstalled.
Should you try:
SELECT * FROM dba_users;
I have 2 users in oracle database.
When I run this command, I can get 2 users have same name.
select * from v$pwfile_users;
The result as follow.
As you can see there are 2 C##user1.
2 C##user1 are different sysdba field.
I would like to remove C##user1 sysdba is true.
Thus I would like to remove the first user .
How can I remove the user?
I am using Informatica PowerCenter 9.1 and am trying to combine 2 columns from 2 sources. Basically trying to create a report that will show all users and the roles they have on 2 separate databases. They could be in one database and not the other so I have to account for that as well.
So if I had this output:
DATABASE 1 (Oracle)
User 1 = Role A
User 2 = Role B
DATABASE 2 (Sybase)
User 1 = Role C
User 3 = Role D
I want the output to look like this:
User 1 = Role A --- Role C
User 2 = Role B --- N/A
User 3 = N/A --- Role D
Any help in figuring this out would be greatly appreciated.
You can us joiner transformation to link them together and then use expression to concat.
Read from database using 2 separate source qualifier transformation and join them using joiner.
Join condition would be user_id. Join type should be full outer join. Full join will pick up all data (matching and not-matching) in either table.
Then pickup user_id, role1(Oracle) and role 2 (Sybase) and concat them with IFNULL logic like this -
IIF (ISNULL(role1), 'N/A', role1)||IIF (ISNULL(role2), 'N/A', role2)
To concatenate two columns from two different tables into a single column at target will not work in Informatica. You can combine only columns in a single table. But there is a work around and it is using "Post SQL" query and here you can write a database JOIN query.
while installing sap on 3 tiered architecture, I need to install database instance (oracle) and central instance(sap) and two different machines.
after completing database install and proceeding with central instance installation, the setup is trying to access a table and fails with following error
SELECT USERID, PASSWD FROM
SAPUSER WHERE USERID IN (:A0, :A1)
OCI-call failed with
-1=OCI_ERROR SQL error 942: 'ORA-00942: table or view does not exist'
*** ERROR => ORA-942 when
accessing table SAPUSER
so I checked and found out that two cases are possible
Table does not exist or
User has no access rights to this Table
next I checked for table, and found an entry in dba_tables,
SQL> select owner from dba_tables where table_name='SAPUSER';
OWNER
------------------------------
OPS$E64ADM
but when trying to fetch data from it using select query
SQL> select * from SAPUSER;
select * from SAPUSER
*
ERROR at line 1:
ORA-00942: table or view does not exist
now I am confused, whether the table is available or not. what is the reason for this and how can it be resolved?
It depends on where you are accesing the object from,
check to see which user you are logged in as
SQL> SHOW USER
This will show which user you are logged in as,
if you are in OPS$E64ADM, the directly query using
SQL> select * from SAPUSER;
if show user show anyother user you need privilege to access it from other users, can ask dba or if you have access then run,
SQL> grant select on OPS$E64ADM.SAPUSER to username; -- the username from which you want to access the table;
then, you can acces from the other user , using,
SQL> select * from OPS$E64ADM.SAPUSER
who are you signed in as? unless it's the owner of the table you will need to change your code to include the owner ie.
select * from OPS$E64ADM.SAPUSER
I'm trying to isolate duplicates in a 500MB database and have tried two ways to do it. One creating a new table and grouping:
CREATE TABLE test_table as
SELECT * FROM items WHERE 1 GROUP BY title;
But it's been running for an hour and in MySQL Admin it says the status is Locked.
The other way I tried was to delete duplicates with this:
DELETE bad_rows.*
from items as bad_rows
inner join (
select post_title, MIN(id) as min_id
from items
group by title
having count(*) > 1
) as good_rows on good_rows.post_title = bad_rows.post_title;
..and this has been running for 24hours now, Admin telling me it's Sending data...
Do you think either or these queries are actually still running? How can I find out if it's hung? (with Apple OS X 10.5.7)
You can do this:
alter ignore table items add unique index(title);
This will add a unique index and at the same time remove any duplicates, which will prevent any future duplicates from occurring. Make sure you do a backup before running this command.