MCPcopy Index your code
hub / github.com/docker/docker-agent / UpdateSessionPermissions

Method UpdateSessionPermissions

pkg/server/session_manager.go:841–852  ·  view source on GitHub ↗

UpdateSessionPermissions updates the permissions for a session.

(ctx context.Context, sessionID string, perms *session.PermissionsConfig)

Source from the content-addressed store, hash-verified

839
840// UpdateSessionPermissions updates the permissions for a session.
841func (sm *SessionManager) UpdateSessionPermissions(ctx context.Context, sessionID string, perms *session.PermissionsConfig) error {
842 sm.mux.Lock()
843 defer sm.mux.Unlock()
844 sess, err := sm.sessionStore.GetSession(ctx, sessionID)
845 if err != nil {
846 return err
847 }
848
849 sess.Permissions = perms
850
851 return sm.sessionStore.UpdateSession(ctx, sess)
852}
853
854// UpdateSessionTitle updates the title for a session.
855// If the session is actively running, it also updates the in-memory session

Callers 1

Calls 4

GetSessionMethod · 0.65
UpdateSessionMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected