summaryrefslogtreecommitdiff
path: root/test/fixtures/users.yml
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-01 00:27:34 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-01 00:27:34 +0200
commit8bcacace28df52fd972c54e6850aa3b93f5c8bdf (patch)
tree05e90dd4e8f31ebb142f66239025da15e873901f /test/fixtures/users.yml
parent529f81b28ed77c62acaa63fad957e751798f2440 (diff)
Declare role requirements per controller
RoleRequired supplies require_redaktion and require_admin for surfaces that are not nodes and so cannot be reached by Node#restricted?. Navigation is content rather than plumbing, so menu_items requires redaktion. User management is janitorial and requires admin: index, new, create, reset_otp, deactivate, reactivate. verify_status now also covers show, without which any logged-in user could read any account by walking a small id space. Editing your own account stays open. The dashboard hides the Users and Navigation buttons from those who cannot use them; everything else stays visible to everyone. Both denials share one message and land on the dashboard. Adds redella (redaktion) and alufa (redaktion + alumni) fixtures.
Diffstat (limited to 'test/fixtures/users.yml')
-rw-r--r--test/fixtures/users.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml
index f8d32d3c..2c433067 100644
--- a/test/fixtures/users.yml
+++ b/test/fixtures/users.yml
@@ -14,3 +14,21 @@ aaron:
14 crypted_password: 740a48caf7dd5ff11318d812d57c0a0928cfbc12 # 'monkey' 14 crypted_password: 740a48caf7dd5ff11318d812d57c0a0928cfbc12 # 'monkey'
15 created_at: 2024-01-02 00:00:00 15 created_at: 2024-01-02 00:00:00
16 roles: ["admin", "redaktion"] 16 roles: ["admin", "redaktion"]
17
18redella:
19 id: 3
20 login: redella
21 email: redella@example.com
22 salt: cf993996a70d31f924aff17a5f997722cb6ec2dd
23 crypted_password: 11c672158b0eb6e8c91c438b3eb844902308b138 # 'monkey'
24 created_at: 2024-01-03 00:00:00
25 roles: ["redaktion"]
26
27alufa:
28 id: 4
29 login: alufa
30 email: alufa@example.com
31 salt: cf993996a70d31f924aff17a5f997722cb6ec2dd
32 crypted_password: 11c672158b0eb6e8c91c438b3eb844902308b138 # 'monkey'
33 created_at: 2024-01-04 00:00:00
34 roles: ["redaktion", "alumni"]