fix(app): permission indicator

This commit is contained in:
Adam 2026-02-26 20:40:39 -06:00
parent e9a7c71141
commit b0b88f6792
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
3 changed files with 52 additions and 12 deletions

View file

@ -33,6 +33,13 @@ export const latestRootSession = (stores: { session: Session[]; path: { director
.flatMap((store) => store.session.filter((session) => isRootVisibleSession(session, store.path.directory)))
.sort(sortSessions(now))[0]
export function hasProjectPermissions<T>(
request: Record<string, T[] | undefined>,
include: (item: T) => boolean = () => true,
) {
return Object.values(request).some((list) => list?.some(include))
}
export const childMapByParent = (sessions: Session[]) => {
const map = new Map<string, string[]>()
for (const session of sessions) {