Jump to content

UserGroups module in development: groups & page based permissions


apeisa

Recommended Posts

last github commit was Mar 13, 2014. Any progress or plans here?

There hasn't been much progress since then (that I'm aware of), but the module is already in production use on some of our sites. It's a lot more stable than the version numbers indicate :)

  • Like 2
Link to comment
Share on other sites

I think only real issue left is PageFiles permissions. They still follow the template access.

Really? Either I don't quite understand what you're after here or you've got some kind of blackout :P.

See https://github.com/apeisa/UserGroups/issues/20 to refresh your memory. Page::isPublic() was made hookable by Ryan about the same time too and it's in 2.4 stable.

I wish I had time to polish the package but it doesn't look too promising any time soon. Everything works but there are some smaller things missing that would make the implementation more complete. Hopefully someday.

  • Like 6
Link to comment
Share on other sites

I have never had such a need. Maybe with just some css? Pagelist has this kind of classes: PageListID1024

I have no idea though what would be best way to inject that kind of css to admin. Some examples probably on these forums. Simple autoload module would do at least.

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • 2 months later...

Hi all,

I have a form on the site's front end. When the user sends the form, new page is created and i need to add user group and set permisssions for that group (view/edit) for the page, but i don't now how and can't find any API documentation for UserGroups module.

Thanks for help.

Edited by kongondo
Moved to UserGroups support forum
Link to comment
Share on other sites

@majkiris: it's quite simple, really. Groups are just pages and view/edit permissions are defined by page fields view_groups and edit_groups. There's also a separate manage_access checkbox field, which defines whether a specific page manages permissions itself, or if it uses permissions from one of it's parent pages.

If you want to add a new group, just add a page with template user-group under the groups page at Admin. If you want to grant this new group view permission to a page, find the page and add this new group into its view_groups field. Then save the page, and UserGroupsHooks.module should handle the rest -- though you might also have to enable manage_access (setting it to '1'), can't remember how exactly this worked.

Hope this helps a bit. Please let us know if you need more specific instructions.

  • Like 1
Link to comment
Share on other sites

One proplem, in PW 2.5.2 after installing this I get 'Template "permission" is not allowed here.' error when adding new permissions.

It's been a while, but just for the record: this issue (or at least one with identical symptoms) has been fixed some time ago.

Link to comment
Share on other sites

@majkiris: it's quite simple, really. Groups are just pages and view/edit permissions are defined by page fields view_groups and edit_groups. There's also a separate manage_access checkbox field, which defines whether a specific page manages permissions itself, or if it uses permissions from one of it's parent pages

....

Thank you teppo. I know it is a page. I was making one mistake, instead of $page->view_groups or $page->edit_groups i used $page->user_groups and that's the reason why it didn't work. Thak you again. Next time a will look at the template fields better :)

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...