diff --git a/ember/app/components/project-form/component.js b/ember/app/components/project-form/component.js
index c89d9808..080600ba 100644
--- a/ember/app/components/project-form/component.js
+++ b/ember/app/components/project-form/component.js
@@ -34,6 +34,10 @@ export default class ProjectFormComponent extends Component {
saveProject = dropTask(async () => {
try {
+ if (this.project.repoType === 'public') {
+ this.project.accessToken = '';
+ }
+
const project = await this.project.save({
adapterOptions: {
include:
@@ -61,6 +65,7 @@ export default class ProjectFormComponent extends Component {
});
this.router.transitionTo('projects.detailed', project.id);
+ this.project.accessToken = '';
this.notification.success('Successfully saved!');
} catch (e) {
this.notification.danger(e);
@@ -79,4 +84,8 @@ export default class ProjectFormComponent extends Component {
get users() {
return this.store.peekAll('user');
}
+
+ get repoTypes() {
+ return ['public', 'access-token'];
+ }
}
diff --git a/ember/app/components/project-form/template.hbs b/ember/app/components/project-form/template.hbs
index 9eabb803..cfdcc972 100644
--- a/ember/app/components/project-form/template.hbs
+++ b/ember/app/components/project-form/template.hbs
@@ -11,7 +11,25 @@
as |f|
>