added getPermissions action to model
fixed npe