#1796 Access levels in pagure
Merged by pingou. Opened by vivekanand1101.
vivekanand1101/pagure access_levels  into  master

Download 1796.patch
no initial comment

Coming soon: Test and Documentation

I'm seeing urlpattern being used in that file

We will need to update fedmsg_meta for these new messages

Is there a reason for this change (outside the semantic)? Not that I disagree w/ it, more curiosity :)

Should we raise an exception instead?

Hm, we may have to change something in the DB for this (if it's not already part of the alembic migration)

I added it https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure/pull/397/files

Nice one, although we may want to merge it sooner (ie it could be in another PR)

Same as above, could benefit from being in its own PR

:rocket: :dancers: :bullettrain_side:

I was revisiting out ACL script and i thought it might help. It's not required thought. Should i remove it?

No no it's fine, I was merely being curious :)

agreed

we can afford to allow get requests for group list, even with user mngt turned off

something like this - https://pagure.io/pagure/pull-request/1796#_1,66 ? :D

Cool, it is :)

2 new commits added

  • Raise an exception when access level is not found
  • Add new exception: AccessLevelNotFound

1 new commit added

  • Add missing import: urlpattern in api/issues

rebased

rebased

@pingou , done the changes and moved some changes to a different PR as you said.

Someone has pointed out the difficulties to upgrade pagure from N to N+2 (without going via N+1) and one of the reason is our current workflow and reliance on createdb.

So I am thinking we should change that and just add the create_table calls in the alembic migration files as well.

Would you mind adding it?

We may want to add a small text documenting what the different access levels do in that page so people know when they access it (also valid for the add_group page)

I would like to propose the following patch:

0001-Add-a-contributors-property-to-the-projects-and-list.patch

https://paste.fedoraproject.org/542818/34284148/

2 ideas/remarks:

  • I added an user with commit to one of my project and that project does not show up on that user's page
  • We should add a way to edit someone's status, we can do it via the add someone button but it's not quite intuitive

rebased

@pingou done. For editing someone's access, i have put a button beside the "delete user" button in settings page which takes the user to add_user/add_group_project page with the name of user/group already filled. I have put details about different access levels in that page as well.

The users with commit access should also have the repo in their index page now.

Few more questions :)

  • Could we use the same style for the edit button as we do in Issue Tags section?
  • We need to make the column larger on the add user page, with the added text is the
    window is a little squeezed it looks odd
  • Order the ACLs in the add page to not have admins be the default? (maybe order them
    as ticket, then commit, then admin?)
  • Rename the url argument from user_to_update to user?
  • When editing an user, make its current ACL level be the default/selected level

3 new commits added

  • Some UI changes for adding/updating ACL of user/group
  • change request variable name to user and group in add user/add group page while updating ACL
  • color of button to update ACL should be same as editing issue tags

@pingou done.

rebased

rebased

I can not seem to test this in my dev environment (as I'm only allowed one user). But what I don't see is a way to edit a user's privileges. It "appears" this can only be done when adding a user/group, not after the fact. Like I said I can't fully test this, so perhaps this is not an issue.

If you switch to local auth you should be able to create multiple users (edit the DB if needed to drop the confirmation token).

Vivek added the possibility to edit ACLs level in the settings of the project, there should be an edit button next to the drop user/group one and while the template says adding what you're doing is in fact editing

rebased

rebased

rebased

2 new commits added

  • It's group name not username for group in addgroup page
  • Change text to Update in case we are updating user/group's access

rebased

rebased

The table definition itself should be here rather than mimicking createdb.py :)

Note to self: before merging we should check with alembic history that the history is linear :)

Wow, can i BE more dumb ? :cry: Will change.

rebased

rebased

I tried testing this patch, but it does not apply to master :(

Rebased :)

rebased

Looks like the tests are still not passing :s

1 new commit added

  • Fix the unit-tests for the ACLs change

Ok, so the tests are now fixed, let's see the state of the other PRs :)

Alright, let's merge :)

rebased

Pull-Request has been merged by pingou

Metadata