How to restrict user to specific stage of recruitment? - odoo

I want to add record level security in Applicant model. I want to restrict user to specific stage of recruitment process, he can see only stage that is related to him.

I just needed this domain
[('name','=','First Interview')]
with object hr.recruitment.stage in record rule

Related

How to check access rights, using Cypher, to assets to which users are note directly connected?

We have a bunch of files and we want only users belonging to a certain department to have access to a specific set of files. We want to create a system that would upon swiping the card allows access to files.
I don't want to have multiple relations from each user to each file, but I'd rather have it compartmentalized.
What would Cypher query for this look like?
With the following command, you can now check the access rights of a person or department with a graph database.
The MATCH clause tries to find a pattern where the Person node with the usernaname “jsmith” and the File node with the name “apendix.pdf” are connected within 2 hops with relationships of type BELONGS_TO or HAS_ACCESS_TO.
In summary, the query checks if Mark BELONGS_TO a certain team which HAS_ACCESS_TO a file or whether there is a direct relationship between Person and File with HAS_ACCESS_TO type.
MATCH path=(p:Person {usernamename:"jsmith"})-[:BELONGS_TO|:HAS_ACCESS_TO *..2
]->(f:File {name:"apendix.pdf"})
RETURN *;

Teamspeak hierarchy permission configuration

I'm trying to configure my teamspeak server and I don't know how to do some things, so I'm asking help to configure it... here is what i wanted to do:
I have some categories like 'Minecraft' or 'Planetside 2' or 'Devlopment' and each categorie contain some channel and sub channel. which lead to something like that:
Then about users :
First, there's me: the admin.
Then I want to be able to put some people in a 'Moderator' group
Me and moderators can define some people as 'Categorie leader'. for example, I can put people A to be a 'Minecraft Category leader'
A Categorie leader can define who is in his categorie (of course moderator and admin can also), for instance: My Minecraft categorie leader A can put people B to be a Minecraft Player. But a Minecraft Categorie leader can't put People C as a 'Planetside 2 player'.
This configuration is show on this picture:
Then about the channel !
I will take the example of the Planetside 2 Categorie :
I will have 2 channels in the categorie : the first one will allow only Planetside 2 player, Planetside 2 leader and admin to access it. the second one will allow everybody to access.
How can I do that ?
For the moment I didn't try anything, as I don't want to do some mistake that would make it hard ton configure. But I was thinking about channel group, and allow a channel group to access a particular channel. I found some topics on google which make me think it's not that hard.
But then, i don't find anything which can help me to do the part where I want my Categorie leader putting channel groupe only for his categorie.
Any idea ?
Thanks for your help.
For your first question, unfortunately, this is not possible.
TeamSpeak permission is based on a numeric system, instead of a tree hierarchy system.
In other words, if my value is greater than yours, I have power over you.
So back to your case, the most you can do is a four-level rank, with Admin -> Moderator -> Leader -> Members.
In other words, if your leader made their own member groups, all other leaders can access it (since they got higher power than the member group), which is not something you'd want, but that's the sad reality of it.
Now, to your second question on channel groups, this is doable, just follow the instructions:
set all channel's needed_join_power with a value greater than 0, also make sure that you set the needed_join_power of the channel you want to exclusively for leaders is higher than that value.
set admin and moderator's join_power higher or equals to the value you set for step 1.
set the SERVER GROUP of the default Member group's join power to 0
set up channel groups with Leader and Member, both with join_power higher than the value in step 1, also make sure Leader's join power is higher than Member's
Grant Leader with the power to move user
Done. Once this is complete, the leader can move users into their channel and grant the user with the associated channel groups. When the user is assigned with the associated channel group, they can freely move in and out of the channel at free will.

Reduce Active Directory users in Jira using LDAP Query

I am retrieving users for Active directory in Jira 7 by using LDAP. I am trying to reduce the number of users brought from LDAP to a particular group that we have created. So in order to do that i put (objectCategory=group)(cn=WebAgileDevs) in the group object filter along with the default settings. The only thing i change is the Base DN and credentials required. When i save and test it does show me that it is testing 1 group and 15 users which is what i want!(See the screenshot). BUT, when i go and sync it, it brings in 43000 users!! What am i missing???
Test Remote Directory Screenshot
The group filter is used to filter the list of groups that are imported to JIRA, and the user filter is used to filter the list of users that are imported to JIRA. The two need not necessarily correspond. Your group filter would be instructing JIRA to bring in only that one group (into the list of groups), but without further refinement, your user filter will still be pulling in all users, as you noticed. This means that you need to adjust the user filter too.
From your question, you want to import only those users who are a member of a specific group. Atlassian provides some general guidance here.
The last example on that page is particularly relevant for you:
(&(objectCategory=Person)(sAMAccountName=*)(memberOf=cn=CaptainPlanet,ou=users,dc=company,dc=com))
This tells JIRA to pull in only those user objects that are a member of the group cn=CaptainPlanet,ou=users,dc=company,dc=com. You would want to replace this with your cn=WebAgileDevs (plus whatever trailing qualifiers you need to fully qualify the group name).

Access controls list "Editing Odoo security rules"

I'm trying to modify the access control list of Leave Requests to approve under Leave managements module.
I need to make the Leave Requests to approve menu only accessed by each employee's manager.
ea. if the company has 10 employees under Sales/marketing and 5 employees under IT department. I need the sales manager access his 10 employees' leave requests only and not able to access the rest of company's employees who are not under his authority.
To do it, I modified the record rule domain definition of Leaves officer from [(1,'=',1)] to [('employee_id.parent_id,'=',user.id)]
but it didn't work. How to fix it?
In Your case basically your are totally pass the wrong domain for the record rules.
You are previously using the domain like
[(1,'=',1)] = > Access the all the model record for that model
[('employee_id.parent_id,'=',user.id)] = > Access the Manager parent_id as current user employee only
But in your are accessing only with the manager user only not to access its related user.
so you must have to add the below domain in your record rules:
['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id)]
Basically the manager its self as employee of the company and employee having to attached with its related user.
first Need to understand the following relation :
1. employee_id :
which is indicate the each leave related with one employee.
2. parent_id :
which is indicate the each employee related with one manager for hr.holidays model w[('employee_id.parent_id,'=',user.id)]particular model.hich is called the leave request
3. user_id :
If you want to access the login to the particular employee then and then you must have to set the related user for each employee form.which is labeled as Related User.
4. user :
Which is indicate the global user name means current user which you are currently logged in.
5.id :
means unique id for each record
In your case how the domain will work ?
first it will check the current logged in user as attached current leave employee related user or not.
and then then find the user ids which are having with the same employee attached with the same managers.
It means it will perform the OR operation of SQL Statement for both of the domain.
I hope my answer may helpful for you :)

XACML Policy with Multiple Resources with Multiple Rules and Multiple Actions

In a multiple decision profile scenario I want to create a policy for a particular Tenant and for the root resources like Customer. Here my scenario is like I have a Tenant T1 and Tenant T1 is allowed to access Root resource Customer. Customer is the Top level resource and it will contain sub child resources like: Sub-Resources: name, email. In my scenario how can i create a policy so that i can enforce multiple rules for each sub resources like:
Rule-1:
Admin Permit access to resource-
{name: create,read,update,delete},
{email: create,read,update,delete}
Rule-2:
Employee Permit access to resource-
{name: read,update},
{email: read}
Please share the policy structure and the Request format for the same.
In the request format i want to pass only the Tenant Id and the Root level resource Customer .
In this scenario, what you would want to do is pass in the field id you are interested in.
The request would be: "Can Alice view the name field of customer record #123"?
You could express this as a multiple decision request e.g.:
"Can Alice view the name, email, and job title fields of customer record #123"?
Either way your policy would be field-centric. It would protect a given field or set of fields. You could actually define a set of non-sensitive fields and a set of sensitive fields. You could also even write the policy in terms of field metadata. Instead of saying "a user can view field 'email'", you could write "a user can view a field if the user's clearance > field's sensitivity".
Alternatively, you could also use Reverse Query - that's specific to Axiomatics' APIs though. Reverse Query lets you do the following type of requests / responses:
Q: list the fields Alice can view
A: name, email