On 10/19/06, Tomas Kuliavas <tokul@xxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Tomas, > > > > thank you for your detailed answer to my questions. It was really helpful- > > > > Tomas Kuliavas schrieb: > >> SquirrelMail plugins set hooks in plugins/*/setup.php files. > > > > Ok, I found the entries in the plugins setup.php file - good to know. > > > >> Forced prefs plugin is not visible to end user. You can suspect that > > plugin is enabled only when you don't see standard SquirrelMail options > > or > >> interface elements added by other plugins. > > > > Ok, also cleared. > > > >> Plugin is designed to provide same restrictions to all users. Admin can > > use forced_prefs configuration file to provide restrictions that depend > > on > >> username, but admin will need php coding experience for that. > > > > Ok here is the interesting point... good to know that it is possible to > > restrict options depending on username. > > I will have a look to the code in the next time. > > > >> Useracl plugin uses own option pages attached to menuline hook. Forced > > prefs plugin can disable useracl_menuline and useracl_pagetop functions > > in > >> $fp_disabled_hooks setting. Other parts of useracl plugin can't be > > controlled by forced_prefs plugin. > >> > >> $fp_disabled_hooks = array('useracl_menuline', 'useracl_pagetop'); > >> > >> That's the only thing you can do with forced_prefs plugin to useracl > > plugin. > > > > Ok I tried the entries and it works, but because this is not depending on > > usernames everyone is affected. So therefor it is better to disable the > > plugin in conf.pl. > > ---- config-sample.php ----- > > * Each variable is set with > > * $variable_name = array( > > * 'sm_user_setting1_name' => 'sm_user_setting1_value', > > * 'sm_user_setting2_name' => 'sm_user_setting2_value' > > * } > > ---- config-sample.php ----- > > > > This is only for the $fp_added_settings and $fp_forced_settings? > > Format: > > $fp_forced_settings = array ('andi_hour_format' => '1', > > 'andi_show_num' => '20', > > 'anotheruser_show_num' = '10' ); > > > > But this way it doesn't work. Is it possible to control this options per > > user? > > Because fp_forced_settings and fp_added_settings use option names for > array keys. Plugin doesn't know all used options and assumes that array > key is same as option name. SquirrelMail does not use 'andi_hour_format' > and 'andi_show_num' settings. > > > --- > <?php > // In redirect.php config is loaded before login_verified, > // get username from POST > if(basename(php_self())=='redirect.php' && > sqgetGlobalVar('login_username',$login_username,SQ_POST)) { > $test_username = $login_username; > } elseif(sqgetGlobalVar('username',$username,SQ_SESSION)) { > $test_username = $username; > } else { > $test_username = ''; > } > > switch($test_username) { > case 'andi': > // andi gets one set of restrictions > $fp_forced_settings['hour_format'] = '1'; > $fp_forced_settings['show_num'] = '20'; > break; > > case 'tom': > case 'jerry': > // pets get other restrictions > $fp_forced_settings['show_num'] = '10'; > break; > > default: > // no restrictions by default > } FYI, all this could be possibly more easily accomplished (or at least in a way that does not require hacks to core or plugin code) by adding compatibility between force_prefs (or even user_acl) plugins and Login Manager (vlogin) plugin. I can work with plugin authors to advise if desired. Cheers, Paul ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 -- squirrelmail-users mailing list Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users