[OpenSIPS-Devel] [ opensips-Feature Requests-2191906 ] GROUP:is_user_in: Accept avp in group parameter
SourceForge.net
noreply at sourceforge.net
Fri Dec 26 03:57:50 CET 2008
Feature Requests item #2191906, was opened at 2008-10-24 11:21
Message generated for change (Comment added) made by gmistrinelli
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2191906&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Priority: 5
Private: No
Submitted By: Gustavo Mistrinelli (gmistrinelli)
Assigned to: Sergio Gutierrez (saguti)
Summary: GROUP:is_user_in: Accept avp in group parameter
Initial Comment:
Allow set an avp in group parameter on function is_user_in, module GROUP
is_user_in($ru, $avp(s:group))
This will do user's permissions more flexible and dynamic
Example:
--------
loadmodule "group.so"
loadmodule "dialplan"
modparam("dialplan", "attrs_pvar", "$avp(s:dest)")
# Normalize and classify call
dp_translate("1", "$rU/$avp(s:dest)");
# Check User permissions
if !(is_user_in("Request-URI", "$avp(s:dest)")) {
sl_send_reply("403", "No permission for $avp(s:dest) calls");
exit;
};
----------------------------------------------------------------------
>Comment By: Gustavo Mistrinelli (gmistrinelli)
Date: 2008-12-26 00:57
Message:
Hi Sergio, I have tested after patching with your files and is working fine
using avps, I used avp like summary example and a fixed string to compare
with the second paramer.
If you need additional checks please tell me.
Thank you
----------------------------------------------------------------------
Comment By: Sergio Gutierrez (saguti)
Date: 2008-12-23 12:01
Message:
I have attached patches to implement this feature; I still have duplicated
the definition of function get_hf in both files.
Thanks in advance for feedback.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2191906&group_id=232389
More information about the Devel
mailing list