Skip to content

Do not display private jobs' descriptions in the DeviceTable

Currently the state column of the DeviceTable will display the job's submitter and description even if the user does not have privileges to view the job. This is obviously not desirable.

Fix this by altering the device's current job Prefetch to filter jobs based on the user's view permissions. When a user will not have privileges to view the current job the devices's running_jobs attribute will be assigned an empty list which will result the .current_job attribute to return None. The ExpandedStatusColumn class that is used for the state column already has a code path that handles when the current job returns None and will display a simple word like "Running".

The only downside is that it will be impossible for a user without super privileges (or view permission on jobs) to tell if a device is stuck in running state or running a private job.

Merge request reports