UpdateSessionPermissions updates the permissions for a session.
(ctx context.Context, sessionID string, perms *session.PermissionsConfig)
| 839 | |
| 840 | // UpdateSessionPermissions updates the permissions for a session. |
| 841 | func (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 |
no test coverage detected