> On 30 Nov 2016, at 16:52, heiheshang <strangerfuture2...@gmail.com> wrote:
> 
> observe_acl_is_allowed(#acl_is_allowed{action=publish,
>         object=#acl_mqtt{words=[<<"~site">>,<<"flight">>| _Rest]}}, Context) 
> ->
>     true;
> observe_acl_is_allowed(#acl_is_allowed{action=subscribe,
>         object=#acl_mqtt{words=[<<"~site">>,<<"flight">>| _Rest]}}, Context) 
> ->
>     true;
> observe_acl_is_allowed(#acl_is_allowed{}, _Context) ->
>     undefined.
> 
> z_mqtt:publish(<<"~site/flight">>,[],Context),
> I try different options, but it still does not work, an ordinary user can not 
> send messages only to the administrator.

Maybe add a ?DEBUG() of the arguments in the last clause of 
observer_acl_is_allowed.

Here is an example:

https://github.com/mworrell/mod_chitchat/blob/master/mod_chitchat.erl#L90 
<https://github.com/mworrell/mod_chitchat/blob/master/mod_chitchat.erl#L90>

- Marc

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to