Opened 19 years ago
Closed 19 years ago
#206 closed enhancement (fixed)
Display and filter on permisssion in lists
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | critical | Milestone: | BASE 2.0 |
Component: | web | Version: | |
Keywords: | Cc: |
Description (last modified by )
This is very annoying when these listings are used for linking item A to item B. If the user doesn't have USE permission on item B a PermissionDeniedException is thrown when saving A. It would be better if the list displayed only those items that the user has at least USE permission for.
Change History (5)
comment:1 by , 19 years ago
Milestone: | → BASE 2.0 |
---|
comment:2 by , 19 years ago
Description: | modified (diff) |
---|---|
Priority: | minor → critical |
Summary: | "Select item" listings are displaying items which the user doesn't have USE permission for → Display and filter on permisssion in lists |
Type: | defect → enhancement |
comment:3 by , 19 years ago
Status: | new → assigned |
---|
comment:4 by , 19 years ago
The infrastructure for this ticket is now in place. The most important change is the new setItemPermission() method on the EntityQuery class. With this it is possible to set the permission that is required for the logged in user.
I have tested this on the Labels list page, which can be used as a reference. In summary there are four changes that are needed:
1: Add an import statement:
import="net.sf.basedb.clients.web.PermissionUtil"
2: Add the 'mode' parameter to the method call that configures the query:
final ItemQuery<Label> query = Base.getConfiguredQuery(cc, true, Label.getQuery(), mode);
3: Add a new column definition:
<tbl:columndef id="permission" title="Permission" />
4: Add a new table cell:
<tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
comment:5 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This ticket is now part of tickets #268, #269, #270, #271 and #272.