Viewers & edit collaborators on a project can't see the list of collaborators

Ouverte
#534 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
67/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
backend

Piste de recherche

Start with the collaboration view in documentcloud/projects/views.py around line 675, then read the permission definitions in documentcloud/projects/rules.py around lines 47 and 53. Trace how the project collaborator list is gated and identify a collaborator-level check for viewing it while keeping the existing permission for settings and invitations. Done means viewers and editors can see the collaborator list, while the existing admin-only actions remain gated.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug
Image

If projects are intended to be a collaborative space, this is a confusing user experience. If someone adds me to a project as a viewer or editor, I have no idea who added me at this point.

The collaboration view set is gated by an if here:
https://github.com/MuckRock/documentcloud/blob/d5f6a31764fafd315603503c6c75dc5b4e1c6726/documentcloud/projects/views.py#L675
projects.change_project_all is the permission which gates it.

This is defined here:
https://github.com/MuckRock/documentcloud/blob/d5f6a31764fafd315603503c6c75dc5b4e1c6726/documentcloud/projects/rules.py#L53
as anyone who holds can_change

which is defined here:
https://github.com/MuckRock/documentcloud/blob/d5f6a31764fafd315603503c6c75dc5b4e1c6726/documentcloud/projects/rules.py#L47

That means only authenticated admins of the project can see the collaborator list.

So the collaborators list is tied to the same permission as editing project settings and inviting people. That’s why only admins see it. The fix is to give the list its own collaborator-level check, and leave this permission as is I think.

Langage dominant
Python
Étoiles
55
Forks
10
Merge moyen
1 j 13 h
PR mergées (30 j)
22

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de MuckRock/documentcloud

Toutes les issues de MuckRock/documentcloud

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.