Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Wiki.js
  3. API with group permission does not work?

API with group permission does not work?

Scheduled Pinned Locked Moved Wiki.js
3 Posts 2 Posters 640 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cfelbertp
    wrote on last edited by
    #1

    As I didn't receive any support from Wiki.js maybe someone here knows a solution:

    I enabled the API access, created a key with full access and got the content of a single page, e.g.:

    {
      pages {
        single (id: 15) {
          path
          title
          content
          createdAt
          updatedAt
        }
      }
    }
    

    Then I created a new API key and selected a group for permissions. I assigned all available permission in the content section.

    Under page rules, I configured the following:

    Allow read:pages, read:source, read:history, read:asset
    Path starts with | any locale | /

    When posting the request, I receive a 200: 'You are not authorized to view this page.' It does not matter what id I use. I also tried to configure the exact path of pages I tried to fetch.

    Fetching the list of all pages, however, works with this API key:

    {
      pages {
        list (orderBy: TITLE) {
          id
          path
          title
        }
      }
    }
    

    I use Wiki.js 2.5.298 and Cloudron 7.3.6.

    Many thanks!

    girishG 1 Reply Last reply
    1
    • C cfelbertp

      As I didn't receive any support from Wiki.js maybe someone here knows a solution:

      I enabled the API access, created a key with full access and got the content of a single page, e.g.:

      {
        pages {
          single (id: 15) {
            path
            title
            content
            createdAt
            updatedAt
          }
        }
      }
      

      Then I created a new API key and selected a group for permissions. I assigned all available permission in the content section.

      Under page rules, I configured the following:

      Allow read:pages, read:source, read:history, read:asset
      Path starts with | any locale | /

      When posting the request, I receive a 200: 'You are not authorized to view this page.' It does not matter what id I use. I also tried to configure the exact path of pages I tried to fetch.

      Fetching the list of all pages, however, works with this API key:

      {
        pages {
          list (orderBy: TITLE) {
            id
            path
            title
          }
        }
      }
      

      I use Wiki.js 2.5.298 and Cloudron 7.3.6.

      Many thanks!

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @cfelbertp Seems something wiki.js specific. Have you asked at https://github.com/Requarks/wiki/discussions already ?

      C 1 Reply Last reply
      0
      • girishG girish

        @cfelbertp Seems something wiki.js specific. Have you asked at https://github.com/Requarks/wiki/discussions already ?

        C Offline
        C Offline
        cfelbertp
        wrote on last edited by
        #3

        @girish Yes, weeks ago, but I didn't get any helpful feedback: https://github.com/requarks/wiki/discussions/6216

        I don't even know if this is a bug or if I'm just not smart enough to configure it.

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search