Skip to content

Commit 379e3e0

Browse files
committed
#521 Give server default agent sudo rights
1 parent 348ca6a commit 379e3e0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Changes to JS assets are not included here, but in [`atomic-data-browser`'s CHAN
88

99
- Add parent parameter to search endpoint which scopes a search to only the descendants of the given resource. #226
1010
- Bookmark endpoint now also retrieves `og:image` and `og:description` #510
11+
- Give server agent rights to edit all resources, fix issue with accepting invites in private drives #521
1112

1213
## [v0.33.1] - 2022-09-25
1314

lib/src/hierarchy.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ pub fn check_rights(
114114
if resource.get_subject() == for_agent {
115115
return Ok("Agents can always edit themselves or their children.".into());
116116
}
117+
if let Ok(server_agent) = store.get_default_agent() {
118+
if server_agent.subject == for_agent {
119+
return Ok("Server agent has root access, and can edit anything.".into());
120+
}
121+
}
117122

118123
// Handle Commits.
119124
if let Ok(commit_subject) = resource.get(urls::SUBJECT) {

0 commit comments

Comments
 (0)