wp-media / adminimize

Adminimize is a WordPress plugin that lets you hide 'unnecessary' items from the WordPress backend.
https://wordpress.org/plugins/adminimize/
GNU General Public License v2.0
100 stars 31 forks source link

Dashboard Not Hiding Boxes for Dual Role Users #100

Closed daveglines closed 6 years ago

daveglines commented 6 years ago

Version Information

Steps to Reproduce

  1. Logged in as Admin
  2. Went to Settings > Adminimize > Dashboard > Checked dashboard boxes that should be hidden (WPEngine, Wordpress News, etc.)
  3. Went to Users > selected user in more than one role
  4. Viewed dasbhoard.

What I Expected

Dasbhboard boxes should be hidden for users in two roles if both roles have the check boxes checked.

What Happened Instead

Users in both roles see the boxes, but users in only one role do not see the check boxes.

Screenshot or Video

Adminimize Settings: https://prnt.sc/jsn977 Home Page for User in Dual Role: https://prnt.sc/jsn9rc Home Page for Users in Only One Role: https://prnt.sc/jsna7g

bueltge commented 6 years ago

I have tried for now and it works how planed. Only areas there are active in each role of the users will be hide, if the feature support for multible roles is active. Have you tried this also @daveglines ?

daveglines commented 6 years ago

I have tried this, yes but am receiving the error. If users are intwo roles they see extra boxes on home page.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Frank Bültge notifications@github.com Sent: Thursday, June 14, 2018 6:10:10 AM To: bueltge/adminimize Cc: David Glines; Mention Subject: Re: [bueltge/adminimize] Dashboard Not Hiding Boxes for Dual Role Users (#100)

I have tried for now and it works how planed. Only areas there are active in each role of the users will be hide, if the feature support for multible roles is active. Have you tried this also @daveglineshttps://github.com/daveglines ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bueltge/adminimize/issues/100#issuecomment-397257976, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJHTAqXqMMncTL-oo4U91xdncaM6oG0aks5t8kSSgaJpZM4UgvHE.

daveglines commented 6 years ago

After further review, this appears to be an issue with a capability on our side.

Thanks for continued support of a killer plugin!

bueltge commented 6 years ago

Thanks for the feedback and clarification

daveglines commented 5 years ago

Hi, Frank. We are still experiencing this issue. The array sending to the function _mw_adminimize_get_duplicate is returning an array with administrator role.

It's making us look a bit bad because users who should not see dashboard items are seeing a whole bunch of them that are very unrelated to them.

To be more clear, technically:

Array before _mw_adminimize_get_duplicate :

( [acquirer] => Array ( [0] => dashboard_right_now [1] => dashboard_activity [2] => wpe_dify_news_feed [3] => dashboard_quick_press [4] => dashboard_primary [5] => #gadwp-notice ) [administrator] => Array ( [0] => dashboard_quick_press ) [area_rep] => Array ( [0] => dashboard_right_now [1] => dashboard_activity [2] => wpe_dify_news_feed [3] => dashboard_quick_press [4] => dashboard_primary [5] => #gadwp-notice ) [auditor] => Array ( [0] => fl_area_rep_news [1] => fl_corporate_news [2] => dashboard_right_now [3] => dashboard_activity [4] => wpe_dify_news_feed [5] => dashboard_quick_press [6] => dashboard_primary [7] => #gadwp-notice ) [franchisee] => Array ( [0] => fl_area_rep_news [1] => dashboard_right_now [2] => dashboard_activity [3] => wpe_dify_news_feed [4] => dashboard_quick_press [5] => dashboard_primary [6] => #gadwp-notice ) [franchiseadmin] => Array ( [0] => dashboard_right_now [1] => dashboard_activity [2] => wpe_dify_news_feed [3] => dashboard_quick_press [4] => dashboard_primary [5] => #gadwp-notice ) [legal] => Array ( [0] => fl_area_rep_news [1] => fl_corporate_news [2] => dashboard_right_now [3] => dashboard_activity [4] => wpe_dify_news_feed [5] => fl_franchisee_news [6] => dashboard_quick_press [7] => dashboard_primary [8] => #gadwp-notice ) [marketing] => Array ( [0] => dashboard_right_now [1] => dashboard_activity [2] => wpe_dify_news_feed [3] => dashboard_quick_press [4] => dashboard_primary [5] => #gadwp-notice ) [operations] => Array ( [0] => dashboard_right_now [1] => dashboard_activity [2] => wpe_dify_news_feed [3] => dashboard_quick_press [4] => dashboard_primary [5] => #gadwp-notice ) [partner] => Array ( [0] => fl_area_rep_news [1] => dashboard_right_now [2] => dashboard_activity [3] => wpe_dify_news_feed [4] => dashboard_quick_press [5] => dashboard_primary [6] => #gadwp-notice ) [prospect] => Array ( [0] => fl_area_rep_news [1] => dashboard_right_now [2] => dashboard_activity [3] => wpe_dify_news_feed [4] => dashboard_quick_press [5] => dashboard_primary [6] => #gadwp-notice ) [real-estate-agent] => Array ( [0] => fl_area_rep_news [1] => dashboard_right_now [2] => dashboard_activity [3] => wpe_dify_news_feed [4] => dashboard_quick_press [5] => dashboard_primary [6] => #gadwp-notice ) [spouse] => Array ( [0] => fl_area_rep_news [1] => dashboard_right_now [2] => dashboard_activity [3] => wpe_dify_news_feed [4] => dashboard_quick_press [5] => dashboard_primary [6] => #gadwp-notice ) [storemanager] => Array ( [0] => fl_area_rep_news [1] => dashboard_right_now [2] => dashboard_activity [3] => wpe_dify_news_feed [4] => dashboard_quick_press [5] => dashboard_primary [6] => #gadwp-notice ) [terminated-corporate] => Array ( [0] => fl_area_rep_news [1] => fl_corporate_news [2] => dashboard_right_now [3] => dashboard_activity [4] => wpe_dify_news_feed [5] => fl_franchisee_news [6] => dashboard_quick_press [7] => dashboard_primary [8] => #gadwp-notice ) [terminated-franchisee] => Array ( [0] => fl_area_rep_news [1] => fl_corporate_news [2] => dashboard_right_now [3] => dashboard_activity [4] => wpe_dify_news_feed [5] => fl_franchisee_news [6] => dashboard_quick_press [7] => dashboard_primary [8] => #gadwp-notice ) [construction] => Array ( [0] => dashboard_right_now [1] => dashboard_activity [2] => wpe_dify_news_feed [3] => dashboard_quick_press [4] => dashboard_primary [5] => #gadwp-notice ) ) Array after _mw_adminimize_get_duplicate : Array( 'administrator' => array(0) )

bueltge commented 5 years ago

Can you try the current master branch. I have a fix for that inside the master but currently not really time for debugging and testing. You should download as zip via Github and overwrite all files in your environment. Thanks!

daveglines commented 5 years ago

Yes, will definitely try this and let you know how it goes. Thanks!

daveglines commented 5 years ago

Frank, the solution worked. The lead developer will be adding a PR for a couple requests.

Thanks for the quick response.

Regards,

DG

On Mon, Oct 22, 2018 at 3:00 PM David Glines < davidglines@burnbrightpublishing.com> wrote:

Yes, will definitely try this and let you know how it goes. Thanks!

Get Outlook for iOS https://aka.ms/o0ukef


From: Frank Bültge notifications@github.com Sent: Monday, October 22, 2018 1:49 PM To: bueltge/adminimize Cc: David Glines; State change Subject: Re: [bueltge/adminimize] Dashboard Not Hiding Boxes for Dual Role Users (#100)

Can you try the current master branch. I have a fix for that inside the master but currently not really time for debugging and testing. You should download as zip via Github and overwrite all files in your environment. Thanks!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bueltge/adminimize/issues/100#issuecomment-431933911, or mute the thread https://github.com/notifications/unsubscribe-auth/AJHTAkxwIF-03xjVCzOAHuhQvV3X9n07ks5unhMpgaJpZM4UgvHE .

bueltge commented 5 years ago

Great, thanks a lot for your feedback and Tests.