On Fri, Mar 13, 2009 at 2:17 PM, Andreas Bauer <abauer@suse.de> wrote:
Jon Nelson schrieb:
I had a number of problems after upgrading an OBS instance from openSUSE 11.0 to 11.1 The client remains running openSUSE 11.1, as it has for months. The osc version on the client has not changed and is the latest available.
The first is that adding a *comment* via osc did not work. I could add and remove files (PUT/DELETE respectively), but the subsequent POST would not, returning a 403.
I tracked it down to this code, in /srv/www/obs/frontend/app/controllers/source_controller.rb, near line 139:
if not ['diff', 'branch'].include?(cmd) and not @http_user.can_modify_package?(pkg)
I believe two things are wrong with this line. First, it does not include 'commit'. Second, the logic is wrong (it used AND instead of OR), and the corrected version is below.
if not ['diff', 'branch', 'commit'].include?(cmd) or not @http_user.can_modify_package?(pkg)
The original line is correct.
The purpose of this conditional is to exclude 'diff' and 'branch' from the permission check. Every other command (including 'commit') requires the 'modify_package' permission.
OK. Why, then, does my user apparently no longer have sufficient permissions? As I said, i used this for quite some time (months) using openSUSE 11.0. The only thing i did was upgrade to 11.1, but this of course entailed reinstalling the obs* packages. I can PUT new files and DELETE existing files but not POST new commit messages?
Second problem: only for the 'Admin' user, editing the user info (/user/edit) fails every time with:
undefined method `source_backend' for #<Person:0x7fac0a31a048>
What might be going on here?
Are you trying to edit using the admin interface of the frontend or the user edit page of the webclient?
The web interface. Log in as Admin. Go to 'home'. Edit user info. Boom. :-( -- Jon -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org