on 11-30-2017 2:13 PM
HI, in my table created_by field is there. that is inserted from backend through session_user in-build function. i am running xsodata file i need to filter craeted_by filed based on current user. I dont know the created_by name i have to fetch from session_user. how to fetch by giving $filter=Created_by eq 'session_user'.
I don't think that you wanna pass the user ID as OData filter parameter, because with that, everyone can do a query for different users (which I think should not be the case). Of course if in the backend are analytical privileges defined which avoids that, that would be no big issue from a security point of view, but in most cases I think there is no such AP.
An option would be to create a calc. view or table function which restricts internally to the current user. Such a calc. view or table function can be exposed as OData service. Advantage for you: You do not have to provide the user when you call the service, because the restriction is done internally (less coding for the caller and secure).
Maybe you wanna search here in the forum, because that topic was already discussed several times.
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.