Mailinglist Archive: opensuse-buildservice (258 mails)

< Previous Next >
Re: [opensuse-buildservice] [PATCH] Unable to delete user via API
  • From: Adrian Schröter <adrian@xxxxxxx>
  • Date: Tue, 10 Aug 2010 11:56:49 +0200
  • Message-id: <201008101156.49695.adrian@xxxxxxx>
On Sunday 08 August 2010 22:30:30 Marcus Hüwe wrote:
On 2010-08-08 14:15:41 -0600, Srinidhi B wrote:
>>> On Monday, 09 August, 2010 at 01:34 AM, Marcus Hüwe<suse-tux@xxxxxx>

On 2010-08-08 13:38:45 -0600, Srinidhi B wrote:
If you try to delete a user from the api (Rails app), you will get a
message saying:

"You sent an invalid request!"

After looking at api/app/controllers/active_rbac/user_controller.rb, I
found that you can only POST to destroy and can only GET on delete.

So here's another trivial patch that allows deletion of users from the
Rails app.

User deletion doesn't "work" at the moment. The issue with this patch is
the "destroy" method just removes the user from the database and doesn't
the project/package metadata relations => the db is an "inconsistent"

Ah okay! I understand. I ensured that I deleted those user's home projects
before deleting the user - and I knew that those users weren't part of any
other projects / packages. :)

So, the correct fix would be to update all projects / packages to which
this user belongs and only then delete the user from the db? Or should
there be some more checks?

Hmm yes + the groups_users table. Additionally the backend needs to be
too otherwise the user would still be in the project/package metadata.

Yes, actually I would like to remove the "delete user" functionality at all. It
only create trouble and even permission/secrurity problems later.

Or we modify the function to lock the user.


Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups