/**
  * Store the form's values as this user's permissions.
  * @param USER $obj
  * @access private
  */
 public function commit($obj)
 {
     $permissions = $obj->permissions();
     if ($this->value_for('use_defaults')) {
         if ($permissions->exists()) {
             $permissions->delete();
         }
     } else {
         foreach ($this->content_groups as $group) {
             foreach ($group->maps as $map) {
                 $map->store_to_object($permissions, $this->value_for($map->id()));
             }
         }
         foreach ($this->global_groups as $group) {
             foreach ($group->maps as $map) {
                 $map->store_to_object($permissions, $this->value_for($map->id()));
             }
         }
         $permissions->store();
     }
 }