-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHS-5907: Implementation: Editors can easily set "view" access for Private Pages #1679
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phewph, that's a lot to review.
First up, the the code in the other repo:
https://github.com/codechefmarc/content_access_simple/blob/9b9135ad1b89dcaebe908673c102fa7063fd7deb/content_access_simple.info.yml#L5
We might be able to get a jump and call it 11 compatible?
https://github.com/codechefmarc/content_access_simple/blob/9b9135ad1b89dcaebe908673c102fa7063fd7deb/content_access_simple.module#L46
We also need to check if the extra field has actually been enabled. Something like
$fieldIsEnabled = $display->getComponent('content_access_simple');
I'm not sure it's a good idea to include "own access" here. In the spec it talks about mostly ignoring the whole concept (i.e. if you're doing stuff with "own access", then it's no longer "simple").
How does Content Access work without our custom module installed? If you create a new node, then change the defaults for that bundle, does the node use the old defaults, or the new defaults? I suspect the former (and our new module will do the same), but if it's the latter, then we'll need to update our code to match.
And then from functional testing:
- Need to rename "Authenticated" as "All logged in users" (just on this form, not globally)
- Need help text "Only the chosen roles will be able to view this content..." this needs to be configurable.
- Unpublished message doesn't match the spec', and needs to be configurable.
- I'm not sure that your plan for not disabling checkboxes will work. Site Manager needs to be visible but disabled.
@dalin- Updated the code and here are my comments on yours:
|
Makes sense. No changes needed.
Sounds good.
Ooooh, smart. On But maybe this is more about generic config vs our config. Lastly, there's a lot of code changed in this PR that seems unrelated. Maybe it needs to merge in the source branch. |
Ahh, for "Lindsey", I know why - we have permissions for our module too and that wasn't set as part of this PR. I'll need to make that change for Site Managers in the config and do an update hook as well. And yup, I had the base incorrect for the merge, so I changed it to the 11.5.2 release branch as the base and now there's only a handful of files changed. However, I'd like to discuss with you how we do this deploy - if we do want this as a contrib module, once we get everything buttoned up, I'll upload to Drupal.org then change composer.json to point to that version and not my repo. |
You might want to bring this up in your weekly call with Albert + SWS. I'm happy to let you handle it, or let me know if you want my opinion. |
We don't have meeting with SWS, but I can ask Joe on the chat. I'd like your opinion though, I haven't been fully involved on this ticket and there are things I might be missing. |
@cienvaras
|
…te hook for suhumsci to allow site manager to use content access simple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahughes3 @codechefmarc This looks really neat. I haven't reviewed the custom module code in detail yet, but I'm wondering if we may want to roll this out only to a few select sites first to beta test and work out any kinks instead of push it out to every site. Because it affects access I think it's better to be a little more cautious to start.
@@ -188,6 +188,7 @@ permissions: | |||
- 'edit terms in hs_person_staff_type' | |||
- 'edit terms in hs_person_student_type' | |||
- 'edit terms in hs_publication_type' | |||
- 'grant content access simple' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly does this permissions allow and could it be renamed to fit into the "access, create, edit, delete, etc.," categories used for other permissions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @joegl, welcome back! This permission grants the ability for the site manager to see the new "Access and Permissions" details pane. See screenshot below. I copied the format from the Content Access module which uses grant content access
as one of their permissions. We can change it if you wish as this module is still not widely used yet (Drupal.org says it's got one install and that may be Stanford?). If we changed it, I would say "access" so it would read access content access simple
if that works for you. Let me know your preference. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @dalin- on changing this to access content access simple
@joegl If you have a way for us to Beta test this feature on stage and then on prod I'm all for it. 4K did a lot of local testing and we did a good amount of Tugboat testing so we feel good about the functionality but we want to test on stage as soon as possible. If you prefer to only have this enabled on select sites these are the sites we would prefer to roll the feature out to as they are waiting on the functionality - english, MTL, and Anthropology |
I like "access content access simple" rather than "grant content access simple". I think the easiest way to roll this out to only a few sites is to remove
And create a follow-up ticket to add it everywhere. |
@dalin- @ahughes3 @codechefmarc Either of these works for me, although I think I lean more towards manually enabling it on the 3 sites. We also may need to set up a few temporary With the permission name change and changes to only enable on the 3 sites I'd be ready to merge this and move forward. Another possible option would be to add an extra "enable" setting into the module itself available on the settings page. That way we could install the module across all sites but only enable it on the 3 sites via the setting (and only have to |
I wonder if that's more complexity than we really need??? I think we're already ignoring all permissions, so just manually giving the |
That's a good point. The |
@codechefmarc @dalin- Because the module is in a separate repo and not a PR, how would you like me to go about reviewing the code and offering feedback? I did take a cursory review of the code and didn't see anything noteworthy. I wish the |
Since this is a contrib module, probably best to create an issue on d.o so that I can fix there and then give you credit at the same time. :) |
@dalin- and @joegl - I've made the following changes:
Let me know if there are any other changes you need. Thanks! |
@codechefmarc Looking good, just one thing left I see
@ahughes3 I know we have a prod deploy next Wednesday -- do you still want to try to get this into that release or wait? Either works for me since we're manually activating it on only 3 sites. |
@joegl - Some guidance here - I attempted to remove this from The other path here is we keep it as is, and because we removed permissions to see it, site managers and non-developers won't see that "Access and Permissions" area. Developers will, of course. Let me know your thoughts. Thanks! |
I say we go the route of adding the settings to I'm pasting the current settings here for reference after they get removed from the PR:
|
…efault config to prep for limited testing
@joegl - OK, removed from |
READY FOR REVIEW
Summary
content_access_simple
that adds a simpler interface for settings view permissions per node.Need Review By (Date)
2024-11-06
Urgency
low
Steps to Test
/admin/structure/types/manage/hs_private_page/access
and also uncheck "Authenticated user" and save/admin/structure/types/manage/hs_private_page/form-display
and drag the "Content Access Simple" "field" to another place in the form and savePR Checklist