DEBUG: mysite:34
{acl_mqtt,direct,<<"site/mysite/flight">>,[<<"site">>,<<"mysite">>,<<"flight">>],<<"mysite">>,<<"uRBtcIBLWCKpWoslTfiR">>}
I see it in the console, what does it mean?
четверг, 1 декабря 2016 г., 1:36:51 UTC+9 пользователь Marc Worrell написал:
>
> Just to be sure, it is a module as in “mod_something.erl” ?
> And other observers in that module are called?
>
> - Marc
>
>
>
> On 30 Nov 2016, at 17:30, heiheshang <[email protected] <javascript:>>
> wrote:
>
> subscription works only in one module, other modules in the code is not
> running. The priority of the module is 10.
> in other modules? DEBUG does not work, do not understand why is not
> called -export([observe_acl_is_allowed/2]).
>
> четверг, 1 декабря 2016 г., 1:18:32 UTC+9 пользователь Marc Worrell
> написал:
>>
>> The function is exported?
>>
>> Maybe make the priority of you module a bit higher.
>> Set it to 10 or so.
>>
>> -mod_prio(10).
>>
>> - Marc
>>
>> On 30 Nov 2016, at 17:14, heiheshang <[email protected]> wrote:
>>
>> observe_acl_is_allowed(X,Context) ->
>> ?DEBUG(X);
>>
>>
>> He added, but there is no output
>>
>> четверг, 1 декабря 2016 г., 0:59:01 UTC+9 пользователь Marc Worrell
>> написал:
>>>
>>>
>>> On 30 Nov 2016, at 16:52, heiheshang <[email protected]> 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
>>>
>>> - 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 [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
> --
>
> ---
> 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 [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.