Skip to content

Commit

Permalink
welcome 2020; add checks for invalid values in policy limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Mar 17, 2020
1 parent a1e879e commit f73dab1
Show file tree
Hide file tree
Showing 25 changed files with 32 additions and 84 deletions.
60 changes: 0 additions & 60 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -278,63 +278,3 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>

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


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
2 changes: 1 addition & 1 deletion bin/php/checkattributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A CLI script which checks problems with all object attributes of a given datatype in current database
*
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion bin/php/checkschema.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A CLI script which checks problems with data in the current schema
*
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion bin/php/checkstorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A CLI script which checks for orphan storage files
*
* @author G. Giunta
* @copyright (C) G. Giunta 2016-2019
* @copyright (C) G. Giunta 2016-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion bin/php/generatedefsfrompersistentobjects.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A CLI script which checks all persistent object defs for FKs and generates a file with definitions
*
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezbinaryfilechecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezfloatchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezimagechecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezintegerchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezmediachecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2016-2019
* @copyright (C) G. Giunta 2016-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezstringchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbiezuserchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/datatypecheckers/ezdbinullabletypechecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/ezdbibasechecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2016-2019
* @copyright (C) G. Giunta 2016-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/ezdbidatatypechecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/ezdbireportgenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Formats results in various modes
*
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/ezdbischemachecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/ezdbischemachecks.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/ezdbistoragecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
3 changes: 3 additions & 0 deletions doc/changelogs/changelog-0.18.0-to-0.19.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog from version 0.18.0 to 0.19.0

. added 5 new custom queries: find invalid values for role policy limitations
4 changes: 2 additions & 2 deletions extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<software>
<metadata>
<name>eZ DB Integrity extension</name>
<version>0.18.0</version>
<copyright>Copyright (C) 2014-2019 Gaetano Giunta</copyright>
<version>0.19.0</version>
<copyright>Copyright (C) 2014-2020 Gaetano Giunta</copyright>
<license>GNU General Public License v2.0</license>
</metadata>

Expand Down
4 changes: 2 additions & 2 deletions ezinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ static function info()
{
return array(
'Name' => "<a href=\"http://projects.ez.no/ezdbintegrity\">eZ DB Integrity extension</a>",
'Version' => "0.18.0",
'Copyright' => "Copyright (C) 2014-2019 Gaetano Giunta",
'Version' => "0.19.0",
'Copyright' => "Copyright (C) 2014-2020 Gaetano Giunta",
'License' => "GNU General Public License v2.0"
);
}
Expand Down
2 changes: 1 addition & 1 deletion interfaces/ezdbidatatypecheckerinterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion interfaces/ezdbischemafileformatinterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2019
* @copyright (C) G. Giunta 2014-2020
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
5 changes: 5 additions & 0 deletions settings/ezdbintegrity.ini
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,8 @@ ezflow_blocks_with_invalid_zones[sql]=SELECT * FROM ezm_block WHERE zone_id NOT
nodes_with_wrong_path[sql]=SELECT c.node_id, c.path_string, p.path_string as parent_path_string FROM ezcontentobject_tree c, ezcontentobject_tree p WHERE c.parent_node_id = p.node_id AND c.path_string NOT REGEXP CONCAT('^', p.path_string, c.node_id, '/$') AND c.node_id <> 1
# for the one below, do we need to account as well for version states 2 and 4 ?
#draft_objects_with_no_draft_versions[sql]=SELECT * FROM ezcontentobject WHERE status = 0 AND id NOT IN ( SELECT contentobject_id FROM ezcontentobject_version WHERE status IN (0, 5) )
policy_limitations_for_missing_subtrees[sql]= SELECT p.role_id, p.id as policy_id, p.module_name, p.function_name, l.identifier, v.value FROM ezpolicy_limitation_value v JOIN ezpolicy_limitation l ON v.limitation_id = l.id JOIN ezpolicy p ON l.policy_id = p.id LEFT JOIN ezcontentobject_tree n ON v.value = n.path_string WHERE l.identifier = 'Subtree' AND n.node_id IS NULL ORDER BY p.role_id, p.module_name, p.function_name, p.id, v.value
policy_limitations_for_missing_locations[sql]=SELECT p.role_id, p.id as policy_id, p.module_name, p.function_name, l.identifier, v.value FROM ezpolicy_limitation_value v JOIN ezpolicy_limitation l ON v.limitation_id = l.id JOIN ezpolicy p ON l.policy_id = p.id LEFT JOIN ezcontentobject_tree n ON v.value = n.node_id WHERE l.identifier = 'Node' AND n.node_id IS NULL ORDER BY p.role_id, p.module_name, p.function_name, p.id, v.value
policy_limitations_for_missing_classes[sql]= SELECT p.role_id, p.id as policy_id, p.module_name, p.function_name, l.identifier, v.value FROM ezpolicy_limitation_value v JOIN ezpolicy_limitation l ON v.limitation_id = l.id JOIN ezpolicy p ON l.policy_id = p.id LEFT JOIN ezcontentclass c ON v.value = c.id WHERE l.identifier IN ('Class', 'ParentClass') AND c.id IS NULL ORDER BY p.role_id, p.module_name, p.function_name, p.id, v.value
policy_limitations_for_missing_sections[sql]= SELECT p.role_id, p.id as policy_id, p.module_name, p.function_name, l.identifier, v.value FROM ezpolicy_limitation_value v JOIN ezpolicy_limitation l ON v.limitation_id = l.id JOIN ezpolicy p ON l.policy_id = p.id LEFT JOIN ezsection s ON v.value = s.id WHERE l.identifier = 'Section' AND s.id IS NULL ORDER BY p.role_id, p.module_name, p.function_name, p.id, v.value
policy_limitations_for_missing_states[sql]= SELECT p.role_id, p.id as policy_id, p.module_name, p.function_name, l.identifier, v.value FROM ezpolicy_limitation_value v JOIN ezpolicy_limitation l ON v.limitation_id = l.id JOIN ezpolicy p ON l.policy_id = p.id LEFT JOIN ezcobj_state s ON v.value = s.id WHERE l.identifier = 'NewState' AND s.id IS NULL ORDER BY p.role_id, p.module_name, p.function_name, p.id, v.value

0 comments on commit f73dab1

Please sign in to comment.