Comments (3)
Branch issue-235-Search_for_state_REVOKED_returns_VOLATILE_and_FIXED created!
from base-repo.
Well, the state attribute is a bit special when it comes to search. The reason is, that the state is used to determine whether a resource is visible to a user or not. As you probably know, there are the four states VOLATILE, FIXED, REVOKED, and GONE. Only VOLATILE and FIXED resources are visible to users, typically a resources is created in state VOLATILE and may or may not move to FIXED.
If a resource is deleted, which can be done by someone with ADMINISTRATE permissions (typically the owner), the resource enters the state REVOKED. In this state, the resource is only returned to users with role ADMINISTRATOR, who can then either patch the state back to VOLATILE/FIXED or delete the resource again to enter the state GONE (which also implies that all data is deleted).
Due to these restrictions it is internally enforced, that filtering for REVOKED resources is only performed if the caller has the role ADMINISTRATOR. Otherwise, the state is handled as if it was empty, i.e., filters for VOLATILE and FIXED are applied. Instead, if you provide FIXED as state in your search, only resources in state FIXED are returned.
You now may ask how it is possible assign the ADMINISTRATOR role for search...well, as I assume that you are not using authentication at all, i.e., only use the SELF identity, there is currently no way to do so, mainly for security reasons. Assigning the ADMINISTRATOR role is only possible when using external JSON Web Tokens issued by a KeyCloak instance.
from base-repo.
OK, I understand, thank you for the explanation (and yes you are correct I don't use authentication).
from base-repo.
Related Issues (20)
- If versioning is not enabled locationUri shouldn't contain version. HOT 2
- Listing DataResource Content Information HOT 1
- weak search performance under certain conditions HOT 1
- Security issues with com.h2database/[email protected]
- Configuration for branch_on_issue action is missing. HOT 1
- Datacite input not working HOT 1
- Mediatype detection issue not solved HOT 1
- Codecov badge is broken HOT 1
- Bump CodeQL from v1 to v2. HOT 2
- Improper dealing with escaped slashes in request URL HOT 1
- Creator can be deleted when reuse it's ID HOT 2
- OpenAPI documentation misleading/incomplete HOT 1
- Add ro-crate support for exporting (and importing?) Data Resources HOT 1
- ElasticConfiguration missing in 1.5.0 Release HOT 1
- Properties validation not working HOT 1
- Elastic search proxy at /api/v1/search not working HOT 1
- fileVersion seems to be based on version HOT 3
- Unordered array content on PATCH HOT 4
- Swagger not accessible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from base-repo.