4663: cannot set custom policy for API Token

nanouck
chipx86
chipx86

What version are you running?

3.0.1

What's the URL of the page containing the problem?

/account/preferences/#authentication

What steps will reproduce the problem?

  1. create an API Token
  2. click on full-access to change policy to custom
  3. create a custom policy

{
  "resources": {
    "repository": {
      "*": {
        "allow": [
          "POST"
        ]
      }
    },
    "*": {
      "block": [
        "*"
      ]
    }
  }
}

What is the expected output? What do you see instead?

full-access remains selected and the policy has not changed when curl access to API
If set read only policy and change to custom with above policy => curl fail

What operating system are you using? What browser?

I run curl POST command against reviewboard API

Please provide any additional information below.

chipx86
#1 chipx86

Fixed on release-3.0.x (c7c394977053092e6a0a53aa7de08214a8ed277c).

  • -New
    +Fixed
  • +Release-3.0.x
  • +Component:API
    +Component:Accounts
  • -cannot set custom policy for API Token
    +cannot set custom policy for API Token
  • +chipx86