Hide editing of certain profiles for KarlStaff
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL3 |
Fix Released
|
Medium
|
Paul Everitt |
Bug Description
OSI has a policy that certain fields (e.g. Job Title) cannot be edited by KarlStaff. We discussed this with Jonathan Hooper when this was implemented (a very technical Zope/Plone dev at OSI) when the policy was drafted. He was ok with doing this in CSS, knowing that a determined person could hack this via Firebug and editing the DOM/CSS.
To Do
========
1) Ping Tres and come up with a sensible policy for how to determine if someone is or is not KarlStaff. Most likely has_permission on:
from karl.utils import find_intranets
intranets = find_intranets(
is_karl_staff = has_permission(
2) Decide how you'd like the fields "hidden". I suggest sticking with the simplest possible thing, which is what KARL2 did.
Here is the relevant CSS from karl/views/
form.staff-role #field-firstname, form.staff-role #field-lastname,
form.staff-role #field-email, form.staff-role #field-phone,
form.staff-role #field-extension, form.staff-role #field-department,
form.staff-role #field-
form.staff-role #field-location, form.staff-role #field-country {
display: none;
}
3) We ran into a bug in KARL2 where the location field was hidden on a form that wasn't the Edit Profile. Let's make sure our CSS scheme can only be triggered on that screen.
Changed in karl3: | |
assignee: | nobody → chris-archimedeanco |
importance: | Undecided → Medium |
milestone: | none → m9 |
Changed in karl3: | |
status: | New → Fix Committed |
Changed in karl3: | |
status: | Fix Committed → Fix Released |
I can put this on my plate, I believe ChrisR was planning to work through Thursday. I'll move other tickets to M10.