How to add new user level in Orangehrm and add some credentials? - orangehrm

I am trying to create a new level of user which is like an admin but has less credentials. He cant configure settings of the modules but can view, add, edit, delete data of the employees. Thanks in advance.

There is hidden "User Roles" module in OrangeHRM, it provides you all the permissions required to change/assign particular menu items to various roles. This needs some custom work such as updating the values on check/uncheck but should be a simple job to do. And tables names are shared by #patxrick should help you to do the modification easily.

You need to insert new user role in ohrm_user_role table.
Then add related records in tables like ohrm_user_role_screen table and ohrm_user_role_data_group.

Related

Give permission to specific rows in database laravel

Is there a way that we can set permissions to database rows in laravel.
Like I have a dropdown and I want to set permission to it’s fields that one user can view all the whole list of the dropdown and the other user can see only 2 fields in the dropdown?
I’ve use spatie package for roles and permissions. I just can’t figure out on how to give permissions to specific rows in database.

How to restrict the table/view access in Bigquery?

Suppose I have 2 users available for the same project. The requirement is to restrict the table access in the same project to one user. How can it be managed it in Bigquery? what kind of access controls to be applied and how?
Thanks in advance.
You can use table level ACLS and set Bigquery roles/bigquery.dataViewer for users on the tables you wish to grant access. More details here https://cloud.google.com/bigquery/docs/table-access-controls-intro
This approach doesn't require creating a separate dataset(as a workaround for table level access) for access control which use to be the case earlier.
Depending on requirements, and the strictness of them, this is what I do:
Grant the user access to a specific table within a dataset by granting the BigQuery Data Viewer role at the table level.
You can do this as follows:
-> Open the table in the console and click Share, then click Add Principal
And to make it easier for the user to navigate the metadata of the table, such as schema, details and preview, I grant them the BigQuery Metadata Viewer role at the dataset level.
You should only do this of course if it is ok for the user to see which other tables within the dataset are there. (they can't see the data in the other tables, just the schema etc)
The advantage is that it will be easier for the user to see the schema and a preview of the data.
More info can be found here:
https://cloud.google.com/bigquery/docs/table-access-controls

How to handle permissions per role

I am working in a Yii project with 4 or 5 roles. Where each role has access to similar forms and views but do not see all fields. Also there are reports which are only for management level roles.
In the past I have managed permissions based on per field control to avoid repeating code, but this get into a nightmare.
My question is, what is the best approach you have used to handle permissions? per field or per view?
I was thinking in create different views and the admin can select which ones to assign to each role.
Any ideas you can bring will help me.
Use RBAC module http://www.yiiframework.com/doc-2.0/guide-security-authorization.html
Once you have defined you role and permission you can use the function provided by Yii2 for show /hide the field you need or for lead the code behavior

Adding Users to Report Server Users Table

I am trying to add users to the Report Servers dbo.Users Table. I see a 36 character USERID. Does anyone know how this is generated? How do i get users to show up in this table?
I do not think you should directly modify/add data in ReportServer database.
To add a new user, go to your Report Manager web page.
For a default installation, it is http://[computer-name]/Reports
For a named instance suppose the instance is sql01, it is http://[computer-name]/Reports_sql01
Next, click on Properties tab. In Security, choose New Role Assignment.
There you can add users that exist on your Local machine, or on your company domain.
This user will show up in the Users table. But again, SQL Documentation advises not to directly manipulate data there. Good luck!

Record level permissions

In a database I am designing I have implemented profile based object level security.
Each user can view, edit, insert, update database tables according to the profiles (roles) he is a member of.
Now there is a need to implement "External Users" who can view only the relevant records and edit some of them (but not the bulk of the database).
I am working on an "record ownership" model.
Are there any ideas on how to restrict the users belonging to an "External Users" profile to see and work with some records of each table, but not all.
You should probably create a VIEW which limits the records and then apply the proper rights on the view.
You could create a VIEW, or you could create select stored procedures and only assign rights to those.
The VIEW is the way to go for a simple security model - if it is complex, go with the stored procedure(s).
I have my first draft. It goes like that:
The app is a Project Management/Issue Tracking/Event Management/Collaboration Web app.
I created a Role "External User". By default a user in that role
can SELECT FROM Persons
can SELECT FROM Units (organizational units-companies-depts etc)
can SELECT Projects assigned to him
can SELECT Tasks assigned to him
can not SELECT any other Projects & Tasks
The administrator can create a user group "External Partner" and assign to that some Projects and Products (with Issues)
The members of this group can SELECT the assigned Objects.
It is a complicated solution, but the only one that solves my customers problem (they don't want external partners to have access to all their project database).