Hide editing of certain profiles for KarlStaff

Bug #356565 reported by Paul Everitt
2
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(context)
   is_karl_staff = has_permission('view', context, request)

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/static/themedstyles.css which shows the identifiers of the fields to hide:

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-organization, form.staff-role #field-position,
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.

Tags: edit-profile
Changed in karl3:
assignee: nobody → chris-archimedeanco
importance: Undecided → Medium
milestone: none → m9
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

I can put this on my plate, I believe ChrisR was planning to work through Thursday. I'll move other tickets to M10.

Changed in karl3:
assignee: chris-archimedeanco → paul-agendaless
Changed in karl3:
status: New → Fix Committed
Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.