New: Ajout possibilit de mettre des permissions sur les groupes

New: Ajout cls d'intgrit sur les groupes et users.
This commit is contained in:
Laurent Destailleur 2005-02-26 14:40:50 +00:00
parent bf009e5c9a
commit 710e59697d
4 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,24 @@
-- ===================================================================
-- Copyright (C) 2005 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 2 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, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Source$
--
-- ===================================================================
ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email);

View File

@ -0,0 +1,29 @@
-- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- 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 2 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, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Source$
--
-- ===========================================================================
-- Supprimme orhpelins pour permettre montée de la clé
delete llx_user_rights
from llx_user_rights
left join llx_user on llx_user_rights.fk_user = llx_user.rowid
where llx_user.rowid is null;
ALTER TABLE llx_user_rights ADD FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);

View File

@ -0,0 +1,29 @@
-- ============================================================================
-- Copyright (C) 2005 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 2 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, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Source$
--
-- ===========================================================================
-- Supprimme orhpelins pour permettre montée de la clé
delete llx_usergroup_rights
from llx_usergroup_rights
left join llx_usergroup on llx_usergroup_rights.fk_user = llx_usergroup.rowid
where llx_usergroup.rowid is null;
ALTER TABLE llx_usergroup_rights ADD FOREIGN KEY (fk_usergroup) REFERENCES llx_usergroup (rowid);

View File

@ -0,0 +1,31 @@
-- ============================================================================
-- Copyright (C) 2005 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 2 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, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Source$
--
-- ===========================================================================
create table llx_usergroup_rights
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_usergroup integer NOT NULL,
fk_id integer NOT NULL,
UNIQUE(fk_usergroup,fk_id)
)type=innodb;