Allow to specify who can view customization by user name and role
Closed this issue · 5 comments
Currently we only have "private" field. But it doesn't allow to create customization for other users (not admins). Also it is useful to show customizations based on user's role in project.
Thanks for the suggestion.
If you want to customize it for each user, you can do so in the code.
In ViewCustomize.context
, you can get the user's information.
For example, if you want to apply it only to roleId:3, you can write the following.
if (!ViewCustomize.context.project.roles.some(function(role) { return role.id == 3 })) {
// Do nothing except for roleId:3
return;
}
If you want to make a decision based on the user, you can use ViewCustomize.context.user.id
.
I thought about preparing it as a setting, but I thought the code could handle it more finely, so I made it this way.
Thanks.
Thank you, nice to know that this is possible. But in such case code snipped will be added and visible to all users. This may be useless traffic and have privacy concerns.
It would certainly be more convenient to have it as a setting.
However, it is hard to provide settings that take into account combinations of conditions such as users, roles, and groups. It is also costly to implement and maintain.
So far, I haven't found any situation where there is a problem with traffic or privacy in this way.
Therefore, we are not planning to implement it at this time.
However, we may consider it if we receive more such requests in the future.
We would appreciate your understanding.
Thanks.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.