#1147 Replacing all get_project to get_authortized_project
Merged by pingou. Opened by farhaan.
farhaan/pagure private-repo  into  private_repo

Download 1147.patch
no initial comment

I'm not sure about this one :/

How is this going to work for private project?

We are not going to use it anywhere since we are not giving any clue of existence of private project

Agreed I was contemplating on this one! but it didn't through any error and test pass too but I should change it to _get_project()

Should I retain it ?

You tell me

Since this is generic and use by all I should give it the power of using _get_project

1 new commit added

  • Fix _get_project where it is required

rebased

I kinda wonder if it makes sense to change all the tests

@puiterwijk thoughts on this?

rebased

So, for the tests, I was thinking that it was fine, since they only use get_project to setup stuff for running the test suite.
Since the tests do all accessing of the under test pages via self.app.get and friends, they should respect the authorized_project.

Now, it would be a good idea to add tests for that specific case :).

I was thinking we may want to keep using get_project to reduce the number of file changed, but that would need to be updated anyway to _get_project so I guess authorized_project is fine.

@puiterwijk I'm not sure to follow what's the specific case you're thinking about :)

Ok, let's merge this for now and @puiterwijk if you could file a ticket for the test case you're thinking about it would be most appreciated :)

Pull-Request has been merged by pingou

Metadata