Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions app/Plugins/Api/Nc2Sso/Nc2Sso.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@

namespace App\Plugins\Api\Nc2Sso;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;

use DB;

use App\Models\Core\UsersRoles;
use App\User;
use App\Plugins\Api\ApiPluginBase;
use App\Plugins\Manage\UserManage\UsersTool;
use App\Traits\ConnectCommonTrait;
use App\User;
use Illuminate\Support\Facades\Auth;

/**
* NC2からのSSO管理クラス
*
* @author 永原 篤 <nagahara@opensource-workshop.jp>
* @author 牟田口 満 <mutaguchi@opensource-workshop.jp>
* @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved
* @category ページ管理
* @package Contoroller
* @package Controller
*/
class Nc2Sso extends ApiPluginBase
{
Expand Down Expand Up @@ -78,7 +74,7 @@ public function index($request, $site_key, $login_id, $token)
if (!empty($user)) {
// ユーザ権限データ取得
//$roles = UsersRoles::getUsersRoles($user->id);
$users_roles = new UsersRoles();
// $users_roles = new UsersRoles();

// 権限が一般 or ゲストの場合は、自動ログイン
// if ($user->role == config('cc_role.ROLE_PAGE_MANAGER') || $user->role == config('cc_role.ROLE_GUEST')) {
Expand Down Expand Up @@ -121,6 +117,7 @@ public function index($request, $site_key, $login_id, $token)
$user->userid = $login_id;
$user->password = 'sso-invalid-password'; // プレーンテキストのパスワードは設定しても、入力パスワードと一致する事はないため、無効になる
//$user->role = 0;
$user->columns_set_id = UsersTool::COLUMNS_SET_ID_DEFAULT;
$user->save();

// ユーザ権限の登録
Expand Down
2 changes: 1 addition & 1 deletion app/Plugins/Manage/UserManage/UserManage.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ private function getColumnsSetIdManageDefault(): int
$columns_set_id = 0;
} else {
// 1:ユーザ一覧(基本)
$columns_set_id = 1;
$columns_set_id = UsersTool::COLUMNS_SET_ID_DEFAULT;
}

return $columns_set_id;
Expand Down
3 changes: 3 additions & 0 deletions app/Plugins/Manage/UserManage/UsersTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class UsersTool
{
const CHECKBOX_SEPARATOR = '|';

/** columns_set_id 初期値 1:基本 */
const COLUMNS_SET_ID_DEFAULT = 1;

/**
* ユーザーのカラム取得
*/
Expand Down