FIX: #5151
This commit is contained in:
parent
79291b7a77
commit
3c42a32690
@ -105,14 +105,14 @@ class modOauth extends DolibarrModules
|
||||
$r=0;
|
||||
|
||||
// This is to declare the Top Menu entry:
|
||||
//$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Put 0 if this is a top menu
|
||||
//$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Put 0 if this is a top menu
|
||||
// 'type'=>'left', // This is a Top menu entry
|
||||
// 'titre'=>'MenuOauth',
|
||||
// 'mainmenu'=>'oauth',
|
||||
// 'url'=>'/oauth/index.php',
|
||||
// 'langs'=>'oauth', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'position'=>300,
|
||||
// 'enabled'=>'$conf->oauth->enabled && $leftmenu==\'admintools\'',
|
||||
// 'enabled'=>'$conf->oauth->enabled && $leftmenu==\'modulesadmintools\'',
|
||||
// 'perms'=>'$user->rights->oauth->read', // Use 'perms'=>'1' if you want your menu with no permission rules
|
||||
// 'target'=>'',
|
||||
// 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
|
||||
@ -138,11 +138,6 @@ class modOauth extends DolibarrModules
|
||||
// Clean before activation
|
||||
$this->remove($options);
|
||||
|
||||
$sql = array(
|
||||
"CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."oauth_state (rowid int(11) NOT NULL AUTO_INCREMENT, service varchar(36), state varchar(128), fk_user int(11), fk_adherent int(11), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
|
||||
"CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."oauth_token (rowid int(11) NOT NULL AUTO_INCREMENT, service varchar(36), token text, fk_user int(11), fk_adherent int(11), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
|
||||
);
|
||||
|
||||
return $this->_init($sql,$options);
|
||||
}
|
||||
}
|
||||
|
||||
25
htdocs/install/mysql/tables/llx_oauth_state.sql
Normal file
25
htdocs/install/mysql/tables/llx_oauth_state.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-- ============================================================================
|
||||
|
||||
CREATE TABLE llx_oauth_state (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
service varchar(36),
|
||||
state varchar(128),
|
||||
fk_user integer,
|
||||
fk_adherent integer,
|
||||
entity integer
|
||||
) ENGINE=InnoDB;
|
||||
25
htdocs/install/mysql/tables/llx_oauth_token.sql
Normal file
25
htdocs/install/mysql/tables/llx_oauth_token.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-- ============================================================================
|
||||
|
||||
CREATE TABLE llx_oauth_token (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
service varchar(36),
|
||||
token text,
|
||||
fk_user integer,
|
||||
fk_adherent integer,
|
||||
entity integer
|
||||
) ENGINE=InnoDB;
|
||||
Loading…
Reference in New Issue
Block a user