wordpress-mobile / wordpress-mobile/WordPress-Android

Restricting Subscriber user (self-hosted) access to the app

Open
#14,455 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Pri] Low [Type] Bug User Feedback
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

It was reported in 3864798-zd-woothemes that a Subscriber user on a self-hosted WordPress site was able to access the Blog Posts menu in the app and create a post. The post wasn't able to be uploaded to the site but it'll be saved in the app locally.

Expected behavior

I would expect the Subscriber user will not be able to log in to the app since they're not able to manage the site.

Actual behavior

The Subscriber user is able to log in to the app, access the Blog Posts menu, and create a post. Though the post will not get uploaded to the site, I'm able to view the comments published on the site through My Site > Comments.

Steps to reproduce the behavior
  1. Create a Subscriber user on a self-hosted WordPress site
  2. Log in as the Subscriber user to the app with the "Enter your existing site address" login option
  3. Once logged in, the user will see Stats, Blog Posts, Media, Comments, Settings, View Site, and View Admin options.
  4. Tap the floating button to create a new blog post.
  5. Tapping the "PUBLISH" button to upload the post, an error will occur and says the post can't be uploaded.
  6. Go to My Site > Comment will see the list of comments published on the site.

Screenshot_2021-04-14-13-54-39-98_1cdbe7dded7ec259ed1024b4ff1ae8db

Tested on OPPO Reno 4, Android 11, WPAndroid 17.1-rc-2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the self-hosted WordPress login with a Subscriber account and trace how the app determines which users may access site features. Check the login, Blog Posts, Media, and Comments entry points for role or capability enforcement. Done means Subscribers cannot log in or access site content, while permitted roles retain normal access.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
authorization, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.