def filters = {
forUser(controller:'user', action:'*') {
before = {
user=springSecurityService.getCurrentUser()
log.info("came to filter and the user is" + user)
}
def new
before_filter do
redirect_to "/" unless current_admin || current_company
flash[:notice] = 'You dont have enough permissions to be here' unless current_admin || current_company