private-mirrors icon indicating copy to clipboard operation
private-mirrors copied to clipboard

Add option to disable actions in mirror creation dialog

Open ajhenry opened this issue 1 year ago • 3 comments

As discussed in #71 it makes sense to create a mirror with actions disabled (this will come with its own caveats but we can cross that bridge when we get there 🌉)

This will be an option that will be off be default in the creation dialog

Let’s also add an env variable that can force this option to be always on, always off, or toggle-able

ajhenry avatar Apr 04 '24 23:04 ajhenry

I feel like there will almost certainly be additional settings that people would want. Not sure if this is feasible, but rather than hardcode just actions on/off, could there be a config stanza of settings names -> values that would be enforced on new repo creation? like this one would be

settings:
  actions:
    permissions: 
      enabled: false

... which would map to the repos/actions/permissions API path.

ahpook avatar Apr 04 '24 23:04 ahpook

That’s a good point, I was thinking about how we could setup a “default” set of permissions on a mirror. Having a config file wouldn’t be hard to implement on self-deployments. I’ll do some more investigating

ajhenry avatar Apr 04 '24 23:04 ajhenry

I know lots of folks use github/safe-settings for general-purpose repo creation policy - maybe there's some prior art there?

ahpook avatar Apr 04 '24 23:04 ahpook