From b733f5c2b90aaa6d8c18d860c4d4e52f0839b008 Mon Sep 17 00:00:00 2001 From: nwb Date: Wed, 14 May 2014 17:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=90=8E=E5=8F=B0=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E7=94=A8=E6=88=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d4248e3cc..b18497548 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -548,6 +548,14 @@ class UsersController < ApplicationController format.api { render_validation_errors(@user) } end end + + unless @user.id.nil? + #后台注册的用户默认权限为男性开发员 + ue = UserExtensions.create(:identity => 3, + :gender => 0, + :user_id => @user.id) + ue.save + end end def edit