Skip to content

feat: add start and endtime for sessions#305

Merged
ZohebShaikh merged 1 commit into
mainfrom
start-and-end-times
May 15, 2026
Merged

feat: add start and endtime for sessions#305
ZohebShaikh merged 1 commit into
mainfrom
start-and-end-times

Conversation

@ZohebShaikh
Copy link
Copy Markdown
Collaborator

@ZohebShaikh ZohebShaikh commented May 14, 2026

And the data is added here:-

    "sessions": {
      "11": {
        "beamline": "b1",
        "proposal_number": 2124,
        "visit_number": 1,
        "start_time": 1778761180,
        "end_time": 1779761180
      },

Policy example with this:-

# We will get the unix timestamp from the database
some_session_end_time := 1779759400 

seconds_to_ns := 1000000000

default allow := false

allow if {
	time.now_ns() <= some_session_end_time * seconds_to_ns
}

@ZohebShaikh ZohebShaikh force-pushed the start-and-end-times branch from cff1932 to 82cbe91 Compare May 14, 2026 12:25
@ZohebShaikh ZohebShaikh marked this pull request as ready for review May 14, 2026 12:28
@ZohebShaikh ZohebShaikh requested a review from tpoliaw May 14, 2026 12:29
@Alexj9837 Alexj9837 self-requested a review May 14, 2026 15:47
Alexj9837
Alexj9837 previously approved these changes May 14, 2026
Copy link
Copy Markdown

@Alexj9837 Alexj9837 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Comment thread bundler/src/permissionables/sessions.rs Outdated
@ZohebShaikh ZohebShaikh merged commit d0653d9 into main May 15, 2026
36 checks passed
@ZohebShaikh ZohebShaikh deleted the start-and-end-times branch May 15, 2026 09:35
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.

3 participants