Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

core: rename ?ACL_ANONYMOUS_USER_ID to ?ACL_ANY_USER_ID to better ref…

…lect its purpose.
  • Loading branch information...
commit 14f0caec7f9bf67ca94769d589812dcfa6add466 1 parent 21339c6
@kaos kaos authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  include/zotonic.hrl
  2. +2 −2 src/support/z_acl.erl
View
2  include/zotonic.hrl
@@ -138,7 +138,7 @@
%% ACL administrator user id
-define(ACL_ADMIN_USER_ID, 1).
--define(ACL_ANONYMOUS_USER_ID, -1).
+-define(ACL_ANY_USER_ID, -1).
%% ACL visibility levels
-define(ACL_VIS_USER, 3).
View
4 src/support/z_acl.erl
@@ -161,7 +161,7 @@ set_visible_for(_VisibleFor, #context{user_id=undefined} = Context) ->
set_visible_for(?ACL_VIS_PUBLIC, Context) ->
Context#context{user_id=undefined, acl=undefined};
set_visible_for(?ACL_VIS_COMMUNITY, Context) ->
- Context#context{user_id=?ACL_ANONYMOUS_USER_ID, acl=undefined};
+ Context#context{user_id=?ACL_ANY_USER_ID, acl=undefined};
set_visible_for(?ACL_VIS_GROUP, Context) ->
Context#context{acl=undefined};
set_visible_for(?ACL_VIS_USER, Context) ->
@@ -175,7 +175,7 @@ can_see(#context{user_id=?ACL_ADMIN_USER_ID}) ->
?ACL_VIS_USER;
can_see(#context{acl=admin}) ->
?ACL_VIS_USER;
-can_see(#context{user_id=?ACL_ANONYMOUS_USER_ID}) ->
+can_see(#context{user_id=?ACL_ANY_USER_ID}) ->
?ACL_VIS_COMMUNITY;
can_see(Context) ->
case z_notifier:first(#acl_can_see{}, Context) of
Please sign in to comment.
Something went wrong with that request. Please try again.