[solved] Unable to change project settings

I first noticed while trying to enable Trusted repository. I would get a popup at the bottom of the screen saying “Successfully updated repository settings”, but the toggle stays disabled and a --privileged build fails. On a hunch I tried to change the timeout value and that looked ok, successful message and the slider stayed put, until I refresh the screen. On refresh the screen is back to defaults.

Drone is running under rancher with the following settings:

version: '2'
services:
  drone-lb:
    image: rancher/lb-service-haproxy:v0.4.9
    links:
    - drone-master:drone-master
    ports:
    - IP:8443:8443/tcp
    labels:
      io.rancher.scheduler.affinity:host_label: lb=true
      io.rancher.container.agent.role: environmentAdmin
      io.rancher.container.create_agent: 'true'
      io.rancher.loadbalancer.ssl.ports: '8443'
  drone-agent:
    image: drone/drone:0.5
    env_file: ./env/drone-agent
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    links:
    - drone-master:drone-master
    command:
    - agent
    labels:
      io.rancher.scheduler.affinity:host_label: drone=agent
      io.rancher.container.network: 'true'
  drone-master:
    image: drone/drone:0.5
    env_file: ./env/drone-master
    ports:
    - IP:8000:8000/tcp
    labels:
      io.rancher.scheduler.affinity:host_label: drone=master
      io.rancher.container.network: 'true'

and the env vars:

==> env/drone-agent <==
DRONE_SECRET=SECRET
DRONE_SERVER=ws://IP:8000/ws/broker

==> env/drone-master <==
DRONE_DATABASE_DATASOURCE=postgres://user:pass@dbhost:5432/db
DRONE_DATABASE_DRIVER=postgres
DRONE_GITHUB=true
DRONE_GITHUB_CLIENT=SECRET
DRONE_GITHUB_SECRET=SECRET
DRONE_OPEN=true
DRONE_ORG=packethost
DRONE_SECRET=SECRET
1 Like

only an admin can change the trusted flag. To setup an admin see http://readme.drone.io/admin/user-admins/

1 Like

@bradrydzewski Thanks, @donny-dont on gitter gave me the same link. I was assuming that github perms were translating to drone!

@bradrydzewski: So that fixes my main problem, but it looks like drone has a bug here. The webpage should not popup that the settings have been updated if that is not really the case. Should I open an issue?

The endpoint is coded to ignore fields that the user does not have permission to update. So the behavior right now is intentional, but I agree not very user friendly. Please consider sending a pull request if you are interested in changing the current behavior.