function getall()
 {
     global $__in, $__out;
     $permission = new permission();
     $__out['arr_permissions'] = $permission->getall();
 }
 /**
 Sets the permissions for a group.
 */
 function set_permissions()
 {
     global $__in, $__out;
     try {
         $group = new group($__in['id']);
         $__out['group'] = $group->this_to_array();
         $permission = new permission();
         $__out['arr_permissions'] = $permission->assoc_array_from_result_array($permission->getall(), "id", "description");
         $__out['selected_permission_ids'] = $group->get_selected_permission_ids();
         if ($__in['__is_form_submitted']) {
             // if form is submitted
             $group->set_permissions($__in['group']['permissions']);
             return dispatcher::redirect(array("action" => "getall"), "updated_successfully");
         }
     } catch (ValidationException $ex) {
         $ex->publish_errors();
     } catch (Exception $ex) {
         throw $ex;
     }
     return true;
 }