implements authorization inside views

(using Smarty variables)