Current user capabilities#3991
Conversation
| blog.setPlanShortName(planShortName); | ||
| blogUpdated = true; | ||
| } | ||
| if (!blog.getCapabilities().equals(capabilities)) { |
There was a problem hiding this comment.
The rest of the code allows for null and so the blog.getCapabilities() can return null. Better to null check. Cheers!
|
@oguzkocer , check out https://github.com/wordpress-mobile/WordPress-Android/blob/feature/current-user-capabilities/WordPress/src/main/java/org/wordpress/android/ui/main/MySiteFragment.java#L364. Up to now, the header was only dependant to the Settings view be visible but it will now need to take into account the People view as well. Cheers! |
|
Thanks for the PR @oguzkocer. I finished with my review pass. Let me know if it needs any additional review. Cheers! |
179ad0e to
6d0f21a
Compare
|
Thanks for the review @hypest. Should be ready for another round! |
|
Done with my 2nd pass @oguzkocer , thanks for the extra effort! No blockers. Ping me if more review is needed or to merge. Cheers! |
|
I have replied to your latest comments @hypest and made the change for the @maxme It's not that big of a deal if you don't have time for the review right now, we're going to ping you guys once this is ready to be merged into |
|
Minor note #3991 (comment) - PR looks good, |
Related #3901. This PR adds a
capabilitiesfield to theBlogmodel which is saved as a json string from the network request. That property is also used to checklist_userscapability to decide whether to show the People page to the current user for a specific site or not. This is the very first PR that uses the capabilities, there will be others soon which will use at leastedit_users&promote_userscapabilities.To test:
list_userscapability (any site where you're an admin will do) and make sure the People row is visiblelist_userscapability and make sure the People row is NOT visible. P.S: I've added my 2nd account as an Author to a test site to test this out./cc @maxme: Whenever I add something to
BlogI feel like I missed something, because it's scattered around. Do you mind taking a quick look at the PR to make sure that's not the case? Thanks!/cc @astralbodies
Needs review: @hypest