Trouble with hbs ValueList as non-admin--what to use instead?

I’ve got code on my https://dashboard.literatecomputing.com/ that works as admin (and has worked for a long while as regular users, I’m pretty sure) that is now failing as a regular user.

When I include this code on the page, it works as an admin, but not as a regular user:

        <ValueList
          @values={{this.server.custom_plugins}}
          @inputType="array"
          @addKey="pfaffmanager.server.custom_plugins_suggestion"
        />

I checked that the regular user has access to this.server.custom_plugins and

What strikes me as strange is that if I hit the page as a regular user, the page renders nothing, not even the {{log ...}} lines in the hbs that do log if the errant lines are removed.

Error occurred:

- While rendering:
  -top-level
    application
      discourse-root
        pfaffmanager
          pfaffmanager.servers
            pfaffmanager.servers.edit

And another <ValueList..> is also causing the same problem. Is there something else I should use? I think that I thought . . . wait. The only place I see <ValueList> is in a admin component.

I’m using this selector to allow users to select plugins, like this:

I can’t remember what I was doing before. I think I did this for the Ember 5 upgrade?

Is there something else I should do?

EDIT: I guess <ValueList is only for admins and now I have a vague memory of creating my own valueList and then wondering why I’d done so and deleting it.

2 Likes

I found the PvalueList that I had created before (and had just copied from the value-ilist in admin) and restored it from github.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.