• Resolved lindamharold

    (@lindamharold)


    Hello,

    I have a question regarding content restriction. I have a pretty complex user structure with many different groups.
    Is it possible to restrict the content in an exclusive manner rather than inclusive manner ?
    As an example, when content is restricted to the groups “Premium” and “North America” I would like for only users who belong to both groups to see it, not either group. So only the users who are in the intersection of the two groups would have access to that content.

    Hope that is clear enough.

    Also, is it possible to restrict access to files via your plugin ?

    Thanks !

Viewing 1 replies (of 1 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    This is not possible out of the box. What about creating a new Access Level and give it to users with both Premium and North America levels? You could use the API to synchronize the levels.

    Or you could change the way authorization works on line 567 in level.php:

    $levels = array_flip($this->get_user_levels());
    foreach ($posts as $post) {
    	if(!isset($levels[$post->ID])) {
    		$kick = $post->ID;
    	} else {
    		$kick = 0;
    		break;
    	}
    }

    Right now it only checks if the user has 1 level that matches a level for some restricted content. You could alter the loop to check it differently.

Viewing 1 replies (of 1 total)
  • The topic ‘Content Restriction’ is closed to new replies.