Org Web Adapter

pages/eng_13995_hr_admin_permission_set_creation.org

ID
fd362b95-d509-4b94-8951-cf4948db51b3
ROAM_ALIASES
ENG-13995

ENG-13995 - HR admin permission set creation

- tags :: 15Five Jira 15Five Feature - HR Admin

Journal

- Note taken on

Started this task a few hours ago.

It probably should have only taken an hour or so, but I ran into two tricky issues.

1. The example company created with the `run_local_scripts` has some crazy bug in it that fucks up the profile form when you try to make a user and company admin. I'll have to make a note to myself to investigate this further, or ask in dev-lounge about it. Possibly it's a problem with my local setup.

2. Once I figured that out, actually chaining the `is_company_admin` status to `is_hr_admin` was funkier than I would have thought. The profile form has some funky data flows, and I basically had to trace through how `is_billing_admin` is configured to get it to work. In the end, you have to intentionally save the value in the form's save method or it wont update.

Description

Permission set needs to be created for HR admin that has all of a typical

account administrator privileges plus ability to see demographic attributes

(race, gender, ethnicity, birthdate, salary)

Development Notes

1. Use decorator like we use with account admin. We can expand this in the future when we start using demographic attributes

2. If someone is an hr admin, they are also an account admin

3. Create new field in user profile – is_hr_admin

4. Similar to is_billing_admin

5. If is hr admin selected, always save it as is company admin as well to ensure they are always synchronized (in profile form)