Affects Version/s: 6.2.X EE, 7.0.0 DXP SP3, Master
When local staging is enabled, user can see Add button in D&M. The issue can't be reproduced on master. On master, I think since UI changes so that the user still access to live site, the issue didn't happen.
The complete cannot be reproduced as it is on 6.2, however the logic in the related code should be different logically as the changes touch public API.
1. Start portal
2. Create a site role called siteRole.
Define Permissions in Site Administration > Content > D&M :
General Permissions: Access in Site Administration
General Permissions: : View
Documents: Add Folder
3. Create a blank site site-staging-on, add the test user as member with siteRole, enable local staging and crate a new page "PageA". And then place Document and Media portlet in the "PageA".
4. Do an initial publish to make sure staging and live site exist.
5. Sign in as user1, go to site-staging-on site, the user can't see "Add button" in Document and Media portlet.
6. Access site-staging-on site >Content-> Documents and Media (enter control panel)
Actual Result: User1 can see the Add button and the Add Folder option.
Expected Result: User1 should not see the Add button because it is the local live site.