Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Rewrite can_access_node using temporary table #84

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/src/main/scala/wust/core/ApiImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ class ApiImpl(dsl: GuardDsl, db: Db, fileUploader: Option[S3FileUploader], email
// you automatically become a member of this node, then we get the graph and use normal access management.
//TODO: hacky and require all callers to assure that user exists in db if parentId is defined...
val requiredAction = page.parentId.fold(Future.successful(())) { parentId =>
db.node.addMemberIfCanAccessViaUrlAndNotMember(nodeId = parentId, userId = userId).map(_ => ())
// db.node.addMemberIfCanAccessViaUrlAndNotMember(nodeId = parentId, userId = userId).map(_ => ())
Future.successful(())
}

// TODO: also include the transitive parents of the page-parentId to be able no navigate upwards
Expand Down
Loading