Documentation ¶
Index ¶
- Constants
- func GetAccessibleGroups(permissions map[string]bool) map[string]bool
- func UserCanAccessDataset(userInfo pixlUser.UserInfo, summary datasetModel.SummaryFileData) error
- func UserCanAccessDatasetWithSummaryDownload(fs fileaccess.FileAccess, userInfo pixlUser.UserInfo, dataBucket string, ...) (datasetModel.SummaryFileData, error)
Constants ¶
View Source
const PermBlessQuantification = "write:bless-quant"
Quantification blessing
View Source
const PermCreateQuantification = "write:quantification"
Quantification creation
View Source
const PermDownloadPiquant = "download:piquant"
View Source
const PermEditDiffractionPeaks = "write:diffraction-peaks"
View Source
const PermExportMap = "export:map"
Ability to export
View Source
const PermPublic = "public"
We have a few public things, mainly getting the API version...
View Source
const PermPublishQuantification = "write:publish-quant"
Quantification publishing
View Source
const PermReadDataAnalysis = "read:data-analysis"
For reading ROI, element set, annotation, expressions
View Source
const PermReadDiffractionPeaks = "read:diffraction-peaks"
View Source
const PermReadPIXLFullDataset = "read:pixl-full-dataset"
Permissions to view different kinds of datasets
View Source
const PermReadPIXLISESettings = "read:pixlise-settings"
General app permissions, eg saving/loading view state
View Source
const PermReadPIXLTacticalDataset = "read:pixl-tactical-dataset"
View Source
const PermReadPiquantConfig = "read:piquant-config"
Piquant setup/administration
View Source
const PermReadPiquantJobs = "read:piquant-jobs"
Piquant jobs
View Source
const PermReadTestFullDataset = "read:test-full-dataset"
View Source
const PermReadTestTacticalDataset = "read:test-tactical-dataset"
View Source
const PermReadUserRoles = "read:user-roles"
User administration
View Source
const PermWriteDataAnalysis = "write:data-analysis"
For being able to write/delete/edit the above
View Source
const PermWriteDataset = "write:dataset"
For being able to edit custom fields/images on dataset
View Source
const PermWriteMetrics = "write:metrics"
For saving metrics
View Source
const PermWritePIXLISESettings = "write:pixlise-settings"
View Source
const PermWritePiquantConfig = "write:piquant-config"
Sharing
View Source
const PermWriteUserRoles = "write:user-roles"
Variables ¶
This section is empty.
Functions ¶
func UserCanAccessDataset ¶
func UserCanAccessDataset(userInfo pixlUser.UserInfo, summary datasetModel.SummaryFileData) error
Returns nil if user CAN access it, otherwise a api.StatusError with the right HTTP error code
func UserCanAccessDatasetWithSummaryDownload ¶
func UserCanAccessDatasetWithSummaryDownload(fs fileaccess.FileAccess, userInfo pixlUser.UserInfo, dataBucket string, datasetID string) (datasetModel.SummaryFileData, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.