Summary:
I’m trying to sort out of using sp_activate_auth()/sp_deactivate_auth() are the functions I’m looking for to activate/deactivate a group permission on a button click, instead of going to the forum admin and adding/removing permission sets from forums.
TL:DR;
The site I’m working on has administrators (like me) that want to handle everything on the site, but we will have Editors that we want to keep out of the forum settings. But at the same time, they HAVE to have access to a particular set of forum settings. I’ve written a function that pulls in assigned forums to the profile page for these users. The idea is, they can turn forum access off and on by checking a box and updating their profile.
So far, I have this working great *except* I need to figure out what function will add/remove a group permission from a forum. So, the process would be:
User edits profile, checks a box relating to the forum they want to turn on, updates profile, and now the group has access to the specific forum.
What happens behind the scene is that my function takes the checkbox value (which contains the usergroup ID) and applies that usergroup to the forum in question. I.e. the same process as going to the back end, clicking “Forums > Add Forum Permissions” and adding (or removing) that usergroup to the forum.
would sp_activate_auth()/sp_deactivate_auth() be what I’m looking for?