GCTC-NTGC / gc-digital-talent

GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
https://talent.canada.ca
GNU Affero General Public License v3.0
22 stars 9 forks source link

[Fix] Touch up frontend permissions #12065

Open tristan-orourke opened 23 hours ago

tristan-orourke commented 23 hours ago

🤖 Resolves #11767

👋 Introduction

This fixes a few places frontend permissions to view different pages, or the links that showed in the new Nav or Dashboard, weren't correct, especially for the newer roles.

🕵️ Details

Where possible, I referenced the same role arrays in permissionConstants to control links appearing in both the nav menu and the dashboard, so ensure they remain in sync. This is a pattern I want to fully move to in #12066 but that involves a larger scope.

🧪 Testing

Log in as community@test.com, as recruiter@test.com, and as process@test.com. For each, consider the nav menu, the dashboard, and click around to different pages. Check that you can access the pages and functionality described, with the restrictions described:

Community Admins should be able to access:

Community Recruiter should be the same as Community Admin, except...

Process Operator should be able to access:

Platform Admin

Additionally, a Platform Admin should be able to view Talent Requests (accessible from nav or the dashboard as Requests) and Communities and Teams should appear in the System settings dropdown menu in the nav bar.

📸 Screenshot

🚚 Deployment

After deploying this, the new roles should be ready to use. We should instruct Recruitment team (and the ATIP team) to use the Pool Manage Access tab to add people to pools, instead of adding them as Pool Operators within a team.

Additionally, we should run php artisan app:sync-pool-process-operator after deploying to ensure Pool Operators are converted to Process Operators.

tristan-orourke commented 1 hour ago

Create pool button hidden if user not authorized to do so: 844c4d329f586c07ef8f0177e20078a5865f1b81

tristan-orourke commented 1 hour ago

Also, while it seems the links are correct... I need to select the "community" role which seems weird to need to do as a process operator 😅

I agree, its not obvious it should be like this, but Process Operators are working under the direction/delegated authority of Community Admins, and we weren't sure how else to organize it.

tristan-orourke commented 1 hour ago

Also, I'm still missing some links for roles in the nav menu.

Which links are missing?

esizer commented 1 hour ago

Also, I'm still missing some links for roles in the nav menu.

Which links are missing?

I think communities and users. Based on the outline you provided, I think community@test.com should have those links. Or am I just misinterpreting that?

tristan-orourke commented 1 hour ago

I think communities and users. Based on the outline you provided, I think community@test.com should have those links. Or am I just misinterpreting that?

They should have those links on their dashboard but not the nav menu, since they shouldn't need to access those pages very often.