Please or Register to create posts and topics.

Permission extension question

I want to set explicit permissions on different forum categories.

Currently I am using a page template for the forum main page to only allow access to a specific Active Directory group. Is there a way to specify a different page template for each forum category? For example, I want to set the page template for the category “General Forum” to “Default Template”, and the category “Faculty” to “<Active Directory Faculty Template>”.

I have the following custom code fragment that I use the following extension for the template for the active directory restriction:

$filename=$_SERVER['DOCUMENT_ROOT']."wp-content/local-includes/UCM_AD.php";
include_once($filename); // Initialize $DefaultADHost, $DefaultADServiceAccount, $DefaultADPassword.
//Connet to UITS Active Directory
$ad=new UCM_AD();
$Group="CLAS_MATH_FacultyRegular"; // Authorization for regular faculty only!
$found=$ad->ADUserTestGroupMembership($NetID,$Group);

get_header();
if( !$found ) // person is not a regular faculty member!
{
   print("<br><br>Authorization denied!<br><br>");
   get_footer();
   exit(-1);
}

Alternately, is there a way to extend the “Permissions” to allow for more than “Everyone”, “Logged in Users”, and “Moderators Only” to accomplish the same thing?

Thanks!

Hello kmarinelli,

I am sorry but different page templates for different forum categories is not possible at the moment. 🙁

For the next big 1.4-release I plan to introduce shortcode-arguments. With those you could show different categories on different pages. And for those pages you could define your favorite page-templates as well. You can follow this GitHub ticket to keep up to date:

https://github.com/Asgaros/asgaros-forum/issues/47

Regarding permissions: There is a user-group script which works together with the User Groups plugin from Katz Web Services. This allows you to create and define user-groups for your different categories. Maybe it can be usefull as well. You can find the script – which I plan to include in the core-plugin one day – here:

https://github.com/Asgaros/asgaros-forum-user-groups

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!