ref: refs/heads/master
commit 212c9dec928faedc2acdc59548ddfd060bc7b8f4
Author: Ladislav Slezak
Date: Wed Aug 5 15:30:37 2009 +0200
Check for empty (nil) login name for a new user
---
plugins/users/app/controllers/users_controller.rb | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/plugins/users/app/controllers/users_controller.rb b/plugins/users/app/controllers/users_controller.rb
index 0ea5cf2..125ad18 100644
--- a/plugins/users/app/controllers/users_controller.rb
+++ b/plugins/users/app/controllers/users_controller.rb
@@ -92,6 +92,11 @@ class UsersController < ApplicationController
# add the new local user
def add_user
+ if @user.uid.nil?
+ @error_string = "Empty login name"
+ return false
+ end
+
# FIXME mandatory parameters must be required on web-client side...
config = {
"type" => [ "s", "local" ]
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org