Posted: March 4, 2014 at 12:00 pm
|
Hi guys, well basically i need to implement some access control logic to allow/restric users to the content on the website, on the features you guys say this can be achieved doing hooks, but i was just wondering, where are the main classes that control the user access? i would like to take a look at them and see how they work :D, can anyone point me in the right direction, I’m using EE v4 π thanks! |
Hi Roy, Are you asking about front-end content? If so, Event Espresso’s classes do not have the hooks you’re looking for. They are within WordPress itself. A review of some of the more popular WordPress plugins may help you find what you’re looking for: |
|
|
Hi Josh, im thinking both, basically im trying to achieve the functionality of the Permission Control for EE3 in EE4, i tried using groups (https://wordpress.org/plugins/groups/) but the i realized that you guys have you own implementation of “edit_post.php” so the creation of events its protected by EE. do you know of a plugin thats compatible with EE and that would let me achieve what i want? Here’s a brief explanation of the project Organizations: With groups i create the relationship between User – Organization, and their role. does that make sense? thanks |
|
forgot to say, they shouldn’t have access to any other functionality inside wordpress |
Hi Roy, |
|
|
I’m not looking for someone to do it, i already have a capable developer, I’m just looking for support, all i need to know is, where does the user control happens in EE4, where’s the class that polls the DB looking for the user’s permissions? that’s all i need to know to get started. ( i just dont want to spend hours looking for it, if you guys could tell where it is would be great! π ) |
You’ll want to look at EE_Admin_Page_Init where you’ll find this filter hook: apply_filters( 'FHEE_' . $this->menu_slug . '_capability', $capability ) where menu_slug corresponds to the menu slug for the page system (i.e. espresso_events) that affects the menu being shown It also uses the built in WordPress current_user_can() function. If you do a project search across the Event Espresso plugin folder for “current_user_can” you’ll find each instance where it’s used. |
|
|
awesome! thank you for your help!! |
You’re welcome. |
|
|
Hi Josh, i’m back again :P. so thanks to you i was able to achieve access to the pages, and manage it “properly”, now i’m trying to filer the content the admin sees, but i haven’t been able to find the proper filter :\ I found the function that loads the events but i don’t really know how to filter the admin table, without modifying the main code. wanna i want to do its pretty much filter this table (i will also need to filter all the other objects -venues, registered users, etc- so any tips about that too will be gladly appreciated π ) thank you! |
|
heres the image, it got removed from the last post |
Hi Roy, The Event Espresso admin tables use wp-list-table, so it may help to check out this guide: http://wpengineer.com/2426/wp_list_table-a-step-by-step-guide/ If you find a spot in EE4 where your customizations would benefit from a filter hook, the dev team welcomes your pull requests via the Event Espresso 4 project on github: |
|
The support post ‘Access Control’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.