- else if(trusted(user))
- rights = rights_string(config->default_rights|RIGHT_ADMIN|RIGHT_RESCAN);
- else
- rights = rights_string(config->default_rights);
+ else if(trusted(user)) {
+ rights_type r;
+
+ parse_rights(config->default_rights, &r, 1);
+ r &= ~(rights_type)(RIGHT_SCRATCH__MASK|RIGHT_MOVE__MASK|RIGHT_REMOVE__MASK);
+ r |= (RIGHT_ADMIN|RIGHT_RESCAN
+ |RIGHT_SCRATCH_ANY|RIGHT_MOVE_ANY|RIGHT_REMOVE_ANY);
+ rights = rights_string(r);
+ } else
+ rights = config->default_rights;