Package io.jenkins.plugins.dorametrics
Class JobVisibility
java.lang.Object
io.jenkins.plugins.dorametrics.JobVisibility
Decides which recorded pipelines the current user may see. Build data is
stored by job name, outside the Jenkins item tree, so every read has to apply
the job's own Item/Read permission: Overall/Read alone says nothing about
what a user may see inside a folder or a restricted job.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanWhether the current user may see data recorded for this job.excludedForCurrentUser(DoraGlobalConfiguration config, MetricsStore store) Everything to leave out of what the current user is shown: what the job settings leave out for everyone, plus jobs the user may not see.excludedForEveryone(DoraGlobalConfiguration config, MetricsStore store) Everything the job settings leave out for everyone: jobs the job filters do not track, and disabled pipelines when that option is on.Full names of recorded jobs the current user may not see.static booleanisRecordedJob(Item item, String recordedName) True when the item found for a recorded name is a job with exactly that name.
-
Method Details
-
canRead
Whether the current user may see data recorded for this job. Administrators see everything, including jobs that no longer exist. Everyone else needs Item/Read on a job that still exists, so a missing job and a job the user may not read look the same.getItemByFullNamealready returns null for a job the user may not read. It also matches names case-insensitively, so the job it finds has to carry exactly the recorded name. -
isRecordedJob
True when the item found for a recorded name is a job with exactly that name. -
excludedForEveryone
Everything the job settings leave out for everyone: jobs the job filters do not track, and disabled pipelines when that option is on. -
excludedForCurrentUser
public static Set<String> excludedForCurrentUser(DoraGlobalConfiguration config, MetricsStore store) Everything to leave out of what the current user is shown: what the job settings leave out for everyone, plus jobs the user may not see.
-