Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Flexible permissions & private repo support #406

Merged
merged 27 commits into from
Sep 6, 2016
Merged

Conversation

prayerslayer
Copy link
Contributor

@prayerslayer prayerslayer commented Aug 14, 2016

Fixes #90

  • Adds option in nav header dropdown to "Allow private repository access" (picture 1). If already enabled it reads "Revoke private repository access".
  • Under the hood Zappr now supports different access levels to operate, currently minimal (the default) and extended. They differ in the scopes needed. Currently the only difference is public_repo in minimal level vs repo scope in extended level.
  • Zappr ensures a cookie zappr_access_level is always set and equal to the user's choice. This is to avoid doing the auth flow twice all the time (because we only know the user and can load it from the database after the first auth flow, and might then need to do a second to have all necessary scopes).
  • Some metadata is displayed after check was toggled (picture 2)

image

image

Todo

  • verify we can deploy without downtime, ie db migration doesn't break existing stack

Further improvements (not necessarily in this PR)

  • Sync repos automatically after changing mode for convenience

@prayerslayer prayerslayer changed the title Less permissions & private repo support Flexible permissions & private repo support Aug 14, 2016
ADD COLUMN access_level ${dialect === 'postgres' ? 'zappr_data.enum_users_access_level' : 'TEXT'} NOT NULL DEFAULT 'minimal';`),
queryInterface.addColumn({
tableName: 'checks',
schema: 'zappr_data'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This essentially makes the configuration option DB_SCHEMA obsolete.

prayerslayer and others added 6 commits August 22, 2016 23:01
; Conflicts:
;	client/containers/RepositoryDetail.jsx
…missions

; Conflicts:
;	config/system.yaml
;	server/handler/CheckHandler.js
;	server/model/Check.js
;	server/server.js
;	test/server/model.test.js
@mfellner
Copy link
Contributor

mfellner commented Sep 5, 2016

👍

1 similar comment
@prayerslayer
Copy link
Contributor Author

👍

@prayerslayer prayerslayer merged commit 1dc5927 into master Sep 6, 2016
@prayerslayer prayerslayer deleted the 90-less-permissions branch September 6, 2016 08:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants