Comments (7)
Here are some steps I've taken:
- Disabled all flows
- Created a new role with full access permissions to CRUD to
directus_users
and full read permissions todirectus_roles
(see screenshot) - Login as a user with that role
- Attempt to create a user, only entering the first name, email, and password
POST
to/users
shows the request body of the three fields. A204
status is returned along with[UNKNOWN] can't convert undefined to object
error- Docker console simply shows a
POST /users 204
with no other errors, even with log level ofdebug
This only happens when a role is not selected from the non-required select input when creating a user. Strangely, when I follow the same steps as an admin, the user is created without incident, and no error is returned.
from directus.
@hanneskuettner Good question, but no, I have no extensions loaded.
I agree it seems like a permissions issue, but the role was just created and the only thing modified are assigning full permissions to directus_users
. Debugging Directus would be a whole lot easier if status codes weren't invisibly changed and meaningful error messages were at least outputted to the console...
I'll keep looking in to it and post back any findings.
from directus.
@hanneskuettner Thank you for all your insight on this issue. It's much appreciated. I'll be looking in to this further.
from directus.
Just tested this, but under sqlite, and it works for me. Mh your response should also not be code 204 but a 200 since we do return the primary key of the created user(s), see:
directus/api/src/controllers/users.ts
Lines 45 to 53 in 9a6e236
from directus.
One possible reason I can see the /users
request return a 204 is if the item service can not read the just created user by its id
, causing a ForbiddenError
that is silently transformed into a 204 response.
I can replicate this issue if I set the permissions of the current user, that is creating the new user, to be too restrictive, such that they are not able to read the just created user. Do you have any permissions (on directus_users
) set up for the role that are different from the standard minimal app permissions?
from directus.
Any hooks that are run by any of your extensions? That it works as an admin still leads me to believe this might be permissions related 🤔
from directus.
Debugging Directus would be a whole lot easier if status codes weren't invisibly changed and meaningful error messages were at least outputted to the console...
As far as I can tell from your report, the [UNKNOWN] can't convert undefined to object
error is actually a frontend only error, that is thrown because the create endpoint unexpectedly returns no content (which is an improvement all on it's own), but there aren't any errors in the API side of things, since it returns a successful 204 (just without the expected content).
from directus.
Related Issues (20)
- [BUG]: foreign_key schema meta missing on m2o fields with unique constraint (MySql8) HOT 4
- JSON fields default value only on field creation HOT 8
- Text Pasting Issues with Headings HOT 3
- JSON fields are displayed as readonly if a default value exists HOT 2
- Unable to Delete Bullet List with mouse HOT 2
- Allow filter operators like _gt _lt _gte _lte on string fields HOT 2
- Prioritize access_token in searchparam over access_token in cookie during websocket connection establishment HOT 3
- Revisions don't work together with translations HOT 1
- Allow "save and stay" to be the default save button action
- Inconsistent uploaded_on, modified_on values from directus_files
- `NotificationsService` accesses `role.app_access`
- Can't filter records by GeoJSON data after update to latest version HOT 4
- enhance: add collection string generic in `ItemService` class
- GraphQL "users" only works with excessive permissions HOT 1
- Docs menu collapses on third level menu HOT 3
- SSO Authenticate with JWT from IdP HOT 1
- Issue creating two image fields in one collection HOT 3
- Custom validation messages not shown when validation error is nested
- help trying to install agency os on my local host but it giving error Type Error: Fetch Failed . Directus is running properly on browser HOT 1
- App doesn't respect root path for TUS uploads
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 directus.