Skip to content

Useroffice#6

Merged
dylanmcreynolds merged 30 commits intomainfrom
useroffice
May 6, 2026
Merged

Useroffice#6
dylanmcreynolds merged 30 commits intomainfrom
useroffice

Conversation

@dylanmcreynolds
Copy link
Copy Markdown
Contributor

@dylanmcreynolds dylanmcreynolds commented Apr 5, 2026

The way tiled handles access controls is by tagging data sets in metadata, then comparing those tags to tags and their associated users. That lists of tags is compiled into a sqlite database, which tiled reads at runtime. The theory is that the sqlite is a cache that can be created occasionally (nightly?) from the facilities proposal system.

So, we need to query the user office 4D database to get lists of esafs by beamline, beamline staff by beamline, then compile them using the tiled code.

We do this in three steps:

  • create a second esaf sqlite database from queries to the 4D apis. This gives us esafs and their users.
  • produce a yaml file of tags (largely from information in the esaf sqlite)
  • Feed both to the tiled AccessTagsCompiler to create the runtime compiled tags sqlite.

FWIW, currently, it only takes about 80 seconds to get all of the esafs from the 4D database.

This PR does:

  • add script to query the user office APIs and pull esaf information into sqlite file for caching
  • add script that turns reads that sqlite file to create a tags yaml that the tiled AccessTagsCompiler reads to compile its tags
  • add a script that takes both the esaf information and the tags yaml file and compiles them into a tiled tags sqlite database, suitable for deployment in tiled.

Currently, for each esaf, a tag and a group are created. The tag is given access to both the esaf group (which contains users) and the appropriate beamline staff group.

Waiting for information from the user office about a possible API to get all beamline staff per beamline, which I will add to the beamline staff groups.

Copy link
Copy Markdown
Contributor Author

@dylanmcreynolds dylanmcreynolds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing with @Wiebke

  • Look at a set of proposal/esaf tags for writing processed data
  • Swap default proposal/esaf tags to read only
  • Add staff write tags
  • undo adapter changes

@dylanmcreynolds dylanmcreynolds mentioned this pull request May 6, 2026
@dylanmcreynolds dylanmcreynolds merged commit e751a50 into main May 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant