[MGNLUI-3590] Make bulk actions configurable in the Pulse Created: 16/Sep/15 Updated: 09/Feb/17 Resolved: 21/Oct/15 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | pulse |
| Affects Version/s: | 5.3.10, 5.4.2 |
| Fix Version/s: | 5.5 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Sang Ngo Huu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 6.5d | ||
| Original Estimate: | 3d | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||
| Sprint: | Saigon 43 | ||||||||||||||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||||||||||||||
| Description |
|
Tasks which are resolved can only be achieved by users with superuser role. A valid situation would be:
In 5.4.x its line 143 in info.magnolia.ui.admincentral.shellapp.pulse.item.list.PulseListFooter:
User user = MgnlContext.getUser();
// TODO ideally context menu action availability should use the same mechanism and rules defined in the messageView config
// but as this is not straightforward, for the time being we hack it like this
if (user.getAllRoles().contains("superuser")) {
addRemoveMenuItem(i18n, itemsTable, contextMenu, "pages.publish.actions.archive");
}
In 5.3.x its line 153 in info.magnolia.ui.admincentral.shellapp.pulse.item.list.PulseListFooter:
User user = MgnlContext.getUser();
// TODO ideally context menu action availability should use the same mechanism and rules defined in the messageView config
// but as this is not straightforward, for the time being we hack it like this
if (user.getAllRoles().contains("superuser")) {
addRemoveMenuItem(i18n, itemsTable, contextMenu, "pages.publish.actions.archive");
}
In my opinion, an implementation like this is exactly what the comment says: "we hack it like this"... |
| Comments |
| Comment by Sang Ngo Huu [ 06/Oct/15 ] |
|
For 5.4.x: All bulk actions is now configurable, user can specific roles for each actions. This is a big changes on code, please think about a major relase for it. For 5.3.x: Current code does not support to configure pulse list, so there are more code changes than 5.4.x. Please review my approach, I will port to 5.3.x later. |
| Comment by Sang Ngo Huu [ 06/Oct/15 ] |
|
Hi had Other idea is create configuration as below and inject it into PulseListFooter with name "messages"/"tasks" which hardcode in this class.
+ pulse
+ bulkActions
+ messages
+ tasks
+ archive
+ roles
+ superuser: superuser
Please give an advice. Thanks |
| Comment by Jan Haderka [ 07/Oct/15 ] |
|
In order to not introduce changes that would not be backward compatible, this fix is available on 5.4.x branch only. |
| Comment by Ilgun Ilgun [ 09/Oct/15 ] |
|
1) You are introducing new delta and this requires a test. |
| Comment by Sang Ngo Huu [ 15/Oct/15 ] |
|
Thanks for your review. I rebased your changes to my branch ( Please help me check it again. |
| Comment by Mikaël Geljić [ 15/Oct/15 ] |
|
Nice one! It's pretty big, but it's also well split as far as I saw Just rephrased issue title, and let's make sure we have 2 reviewers. |
| Comment by Ilgun Ilgun [ 19/Oct/15 ] |
|
Waiting for PR to be created. |
| Comment by Ilgun Ilgun [ 19/Oct/15 ] |
|
Reopening the issue. Since this issue contains some changes in bootstrap files and hence, it introduces a new delta in |
| Comment by Sang Ngo Huu [ 21/Oct/15 ] |
|
I added testcase for version handler. There is PR: https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/pull-requests/4/overview Thanks, |