Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

restricToOwner doesn't seem work... #24

Closed
poupryc opened this issue Aug 8, 2017 · 2 comments
Closed

restricToOwner doesn't seem work... #24

poupryc opened this issue Aug 8, 2017 · 2 comments

Comments

@poupryc
Copy link

poupryc commented Aug 8, 2017

Hello,

I create a blank project with feathersJS-cli and setup the authentication.
But when I get on /users, I get this:

{
    "total": 2,
    "limit": 10,
    "skip": 0,
    "data": [
        {
            "username": "ddvjevihev",
            "email": "pasunecmvdkail@d.mv",
            "permissions": "user",
            "_id": "bEhhtKaqWLrG9yac"
        },
        {
            "username": "fjizeignezp",
            "email": "joeôjgjezob@d.mv",
            "permissions": "user",
            "_id": "ifzCTcH6YKCa1OTY"
        }
    ]
}

It is my two users that I created before.

My interrogation is: Why restrictToOwner() returns all users and not just the current user ?
I think there is not enough example with permissions, searches of users etc ... in the doc :)

Thanks,

EDIT: I have not change anything at all, the parameters of the hook are the same as default

@poupryc
Copy link
Author

poupryc commented Aug 8, 2017

I'm investigating this bug and, strangely, when I send a get since postman, feathers receives a get followed by a find (?)
Why ?

poke @daffl

EDIT: Apparently, this happens with all the test programs... Really I feel lost
I do not find a case like mine in the documentation ...

EDIT2: After 2 hours, I just found that: the node js modules were all corrupted.... yess

In short, it's not your fault!

(for the time being 😄)

@poupryc poupryc closed this as completed Aug 8, 2017
@poupryc
Copy link
Author

poupryc commented Aug 8, 2017

But just why get and find are issued when I just want to get?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant