hi daniel, the $avp is an alias to i:800. My main doubt is where in the table should i mention the values 1,2,3 and 4 for the users who got the appropriate privileges. I am sorry, for i get confused manipulating the values of avp. pls help in this.
thanks a lot jayesh
--------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Hello,
you can either add a new column in the subscriber table and then use avp_scheme (from avpops) to load the value, or just create a new table having the structure of usr_preferences table and store there the values per user. See: http://www.voice-system.ro/docs/avpops/ar01s05.html#db_scheme http://www.voice-system.ro/docs/avpops/ar01s06.html#avp_db_load http://www.voice-system.ro/docs/avpops/ar01s04.html http://www.voice-system.ro/docs/avpops/ar01s07.html
The example at the following link is more or less what you want to achieve: http://www.voice-system.ro/docs/avpops/ar01s08.html#ex_bitmap_acl
Daniel
On 09/28/05 21:21, jayesh nambiar wrote:
hi daniel, the $avp is an alias to i:800. My main doubt is where in the table should i mention the values 1,2,3 and 4 for the users who got the appropriate privileges. I am sorry, for i get confused manipulating the values of avp. pls help in this.
thanks a lot jayesh
Yahoo! for Good Click here to donate http://store.yahoo.com/redcross-donate3/ to the Hurricane Katrina relief effort.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi, I've added a new column to subscriber, int not null default '0'
using this scheme: modparam("avpops","avp_aliases","acl=i:800")
modparam("avpops","db_scheme",
"scheme0:username_col=username;domain_col=domain;value_col=acl;value_type=integer;table=subscriber")
When I try to load values,
if (!avp_db_load("$from","$acl/$scheme0")){ xlog("L_ERR","No ACL..."); sl_send_reply("403","Forbidden - No ACL"); return; };
I get:
ERROR:avpops:dbrow2avp: empty or wrong type for 'value' using scheme
Hi Helge,
thanks for report. It should be fixed now on CVS - please note that the public CVS gets updated with some delay.
regards, bogdan
Helge Waastad wrote:
Hi, I've added a new column to subscriber, int not null default '0'
using this scheme: modparam("avpops","avp_aliases","acl=i:800")
modparam("avpops","db_scheme",
"scheme0:username_col=username;domain_col=domain;value_col=acl;value_type=integer;table=subscriber")
When I try to load values,
if (!avp_db_load("$from","$acl/$scheme0")){ xlog("L_ERR","No ACL..."); sl_send_reply("403","Forbidden - No ACL"); return; };
I get:
ERROR:avpops:dbrow2avp: empty or wrong type for 'value' using scheme