Permalink
Browse files

Deny the new token, not 'private' from simple_private_posts.

  • Loading branch information...
1 parent 946632f commit e11959a20f7ea4849d3cfcefada56d5d98ce6563 @mikelietz mikelietz committed Jan 12, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 membership.plugin.php
View
6 membership.plugin.php
@@ -93,15 +93,17 @@ public function field_save( $key, $value )
// create tokens for newly added
foreach( array_diff( $new_tokens, $old_tokens ) as $description ) {
+ $name = "membership_" . ACL::normalize_token( $description );
+
ACL::create_token(
- "membership_" . ACL::normalize_token( $description ), // prefixed, normalized name
+ $name, // prefixed, normalized name
$description, // description as entered
"membership" // group = "membership"
);
// Deny the anonymous group access this new token
$anon = UserGroup::get('anonymous');
if ( false != $anon ) {
- $anon->deny('private');
+ $anon->deny( $name );
}
}

0 comments on commit e11959a

Please sign in to comment.