Hi,
could you tell me any other reason to use getuserid() on client side : anything you want to do on your client (primarily, what and how you display stuff, whether stuff is editable/actionable) that somehow depends on the current user id versus a user reference in the data.
this means we are exposing our server user_ID to client : that 11 value showing in local storage, is not worse or more dangerous than the same data showing in, for example, retrieved data in your network tab, like the 'createdBy' attribute of an aggregate response. Only banning the getUserId() from the client will not do anything about that, so if your goal is to remove all user id's from client side, there is MUCH MUCH more work to be done.
while fetching list time (server itself) i can use my structure just apply filter or some logic to show the icon) - means I can handle this on server itself : Yes, one of the alternatives is a calculated attribute 'CanDelete' coming from the aggregate (I think that is what you mean), but that is just as easily hacked, by either overriding the response from that list aggregate response, or by resending an altered Delete request.
Sure, you 'handle this on server itself', but the big distinction here is not whether you handle it on server, but whether you apply your security at the moment the Delete is executed. Doing something on server during the retrieval does nothing for security.
I don't understand this sentence if i am correct our entire session basically based on user related tokens (part of userid) that's why we are storing some cookies like nr1Users , nr2Users as secured its completely agreed and accepted.
Dorine