Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
5831068
added info logs for computed field
cedricfrancoys Sep 2, 2024
bf1878c
fixed 'relation' computed field with final target as non-array
cedricfrancoys Sep 2, 2024
7fa1727
Add DataGenerator to create random data + Add value generation to usages
lucaslaurent04 Sep 4, 2024
62d32b4
Add action to generate an entity
lucaslaurent04 Sep 4, 2024
5cc3352
Handle fields that can be null because not required
lucaslaurent04 Sep 4, 2024
4a5e7cb
Handle generator_function to specify in model how to generate random …
lucaslaurent04 Sep 4, 2024
f269e8c
Handle generate data in action core_init_package
lucaslaurent04 Sep 5, 2024
3bc1a26
Better handling of generation of username, firstname and lastname
lucaslaurent04 Sep 5, 2024
c5cc190
Handle unique column retry to find value
lucaslaurent04 Sep 5, 2024
a2f8076
Enhance data generator
lucaslaurent04 Sep 5, 2024
df43752
Add missing seconds in the time for adaptOut in DataAdapterJson
Sep 5, 2024
9325bca
Merge pull request #176 from alexandraYesbabylon/fixed-time-adaptout-…
cedricfrancoys Sep 5, 2024
e89a10b
Enhance generate + Add anonymize
lucaslaurent04 Sep 5, 2024
60fd9bf
Add action to anonymize data of a package using a configuration file
lucaslaurent04 Sep 5, 2024
59221c8
changed loading error scope as ORM
cedricfrancoys Sep 5, 2024
983aa2d
added static keyword in phpdoc for compliance with PHP 8.0
cedricfrancoys Sep 5, 2024
56576d5
fixed test related to JSON time output
cedricfrancoys Sep 5, 2024
0c6cb3d
Merge branch 'dev-2.0' of https://github.com/equalframework/equal int…
cedricfrancoys Sep 5, 2024
54c1210
Add protocol to url generate
lucaslaurent04 Sep 6, 2024
d231728
Fix bug
lucaslaurent04 Sep 6, 2024
92ac4c7
Fix string with selection generate
lucaslaurent04 Sep 6, 2024
23bf2ff
Add legal name to data generator
lucaslaurent04 Sep 6, 2024
e683472
Handle min max for string generation
lucaslaurent04 Sep 6, 2024
a093a32
Fix text usage generate value when no min or max
lucaslaurent04 Sep 6, 2024
4cf2bdf
handle global domain data
lucaslaurent04 Sep 6, 2024
986dad7
Fix bug global domain data
lucaslaurent04 Sep 9, 2024
65ffb90
Simplify code
lucaslaurent04 Sep 9, 2024
5b2f649
Refacto using methods to simplify
lucaslaurent04 Sep 9, 2024
1ff0883
Remove seeding from init package.php
lucaslaurent04 Sep 9, 2024
f7e5af5
Move seed from init/package.php to package/seed.php
lucaslaurent04 Sep 9, 2024
37f064e
Handle add domain for next relation
lucaslaurent04 Sep 9, 2024
c3fa9b5
Handle relation with computed type
lucaslaurent04 Sep 10, 2024
ac69f93
Modify structure to simplify + Allow to seed a specif file only
lucaslaurent04 Sep 10, 2024
9b77279
Refacto anonymize and seed
lucaslaurent04 Sep 10, 2024
56a3dd4
Fix config file filter for anonymize and seed actions
lucaslaurent04 Sep 10, 2024
513ce33
Fix bug var name
lucaslaurent04 Sep 10, 2024
84e2a53
Update description of actions anonymize and seed
lucaslaurent04 Sep 10, 2024
da43c4b
Refacto
lucaslaurent04 Sep 10, 2024
47f737b
Handle relation add to domain data
lucaslaurent04 Sep 10, 2024
2787769
Fix bug domain parse "object." and ".user"
lucaslaurent04 Sep 10, 2024
86c339e
Merge pull request #178 from lucaslaurent04/add-seeder-and-anonymize
cedricfrancoys Sep 10, 2024
dbc291d
updated
cedricfrancoys Sep 10, 2024
a136d42
Merge branch 'dev-2.0' of https://github.com/equalframework/equal int…
cedricfrancoys Sep 10, 2024
8c8c026
added support for using timezone set in settings
cedricfrancoys Sep 11, 2024
35ed94e
fixed relative Exception ref
cedricfrancoys Sep 11, 2024
cc822ca
comments
cedricfrancoys Sep 11, 2024
f719e9c
rename add_to_domain_data to set_object_data + simplify model_generate
lucaslaurent04 Sep 11, 2024
9c85717
Add qty param to model_generate action
lucaslaurent04 Sep 11, 2024
da8a269
Fix qty for many2many relation when use-existing
lucaslaurent04 Sep 11, 2024
a84a24a
Skip object creation if trying to set a value to a field that as to b…
lucaslaurent04 Sep 11, 2024
0a34ed4
Add skip if not able to generate a valid random value
lucaslaurent04 Sep 11, 2024
a30cc07
added log at sucessful sending
cedricfrancoys Sep 11, 2024
5f77ec6
added log reports
cedricfrancoys Sep 11, 2024
67db59b
Refacto
lucaslaurent04 Sep 12, 2024
72de7da
Add remaining todos + Add warnings
lucaslaurent04 Sep 12, 2024
6a7009f
Refacto + Add warning
lucaslaurent04 Sep 12, 2024
88dca76
handle min and max for generate integer and real numbers
lucaslaurent04 Sep 12, 2024
2d43fd6
Handle negative value for usage min and max
lucaslaurent04 Sep 12, 2024
35135e1
fixed URI regex for webapp html5 URL
cedricfrancoys Sep 12, 2024
a65760a
Merge pull request #179 from lucaslaurent04/enhance-model-generate-ha…
cedricfrancoys Sep 12, 2024
c133a8d
Rename old model import
lucaslaurent04 Sep 13, 2024
18a6290
Rename old init import
lucaslaurent04 Sep 13, 2024
ea19cef
Add base for model import
lucaslaurent04 Sep 13, 2024
728f22a
refacto to simplify
lucaslaurent04 Sep 13, 2024
1f062ad
updated author info
cedricfrancoys Sep 14, 2024
e036b5c
minor improvements
cedricfrancoys Sep 14, 2024
938ffa4
merged qty and random_qty + minor improvements
cedricfrancoys Sep 14, 2024
8226715
renamed depencies to dependents + added 'sensitive' attribute
cedricfrancoys Sep 14, 2024
2ed24c8
Use data transformer to add step to adapt data
lucaslaurent04 Sep 16, 2024
d245f6e
Add map-value data transformer
lucaslaurent04 Sep 16, 2024
61d6609
Add import json + import csv
lucaslaurent04 Sep 16, 2024
976e485
Add model import json, json-file and csv-file
lucaslaurent04 Sep 17, 2024
6b5ad37
Fix help
lucaslaurent04 Sep 17, 2024
776053d
Add list/form views for Entity and Column mapping
lucaslaurent04 Sep 17, 2024
819a6d9
Add is index mapping to know when column mapping by index or name
lucaslaurent04 Sep 17, 2024
d76f7ce
Add origin computed field for view listing of column mapping
lucaslaurent04 Sep 17, 2024
06ceee6
Rename import model, so we know it is with entity mapping
lucaslaurent04 Sep 17, 2024
82423e9
Create model import action that accept parameters that match export f…
lucaslaurent04 Sep 18, 2024
6737527
Handle update existing model
lucaslaurent04 Sep 18, 2024
e063eaf
Remove origin_cast_type field of ColumnMapping entity, a data transfo…
lucaslaurent04 Sep 18, 2024
abe4c49
Fix model_import + redo model_import-mapped
lucaslaurent04 Sep 18, 2024
cdb7adf
updated
cedricfrancoys Sep 18, 2024
fcb4c09
updated
cedricfrancoys Sep 18, 2024
872ebf9
Update csv and json import to work with new action import-mapped
lucaslaurent04 Sep 18, 2024
f38ae3d
updated
cedricfrancoys Sep 18, 2024
c9af8f3
updated
cedricfrancoys Sep 18, 2024
ce5077f
replace generate with generation
cedricfrancoys Sep 18, 2024
9df8264
replace generate with generation
cedricfrancoys Sep 18, 2024
e7fd89f
Use model_import in init_package
lucaslaurent04 Sep 18, 2024
e25d377
Merge branch 'dev-2.0' into handle-imports
lucaslaurent04 Sep 19, 2024
07292d8
Add min max constraints in UsageNumber
lucaslaurent04 Sep 19, 2024
679c81d
Fixes after read PR
lucaslaurent04 Sep 19, 2024
64bace3
Enhance model import to force computed field generation + Use model_i…
lucaslaurent04 Sep 19, 2024
c2035ec
Add method to not repeat same code
lucaslaurent04 Sep 19, 2024
67df2b0
Remove not needed TODO
lucaslaurent04 Sep 19, 2024
5e7fd2f
added feedback + prevented overload
cedricfrancoys Sep 19, 2024
5a8b038
updated authoring
cedricfrancoys Sep 19, 2024
77e02f3
set exception as error_unknown
cedricfrancoys Sep 19, 2024
229f4bd
set exception as invalid_param
cedricfrancoys Sep 19, 2024
6d16f73
Merge pull request #181 from lucaslaurent04/handle-imports
cedricfrancoys Sep 19, 2024
6217b29
minor
cedricfrancoys Sep 19, 2024
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
9 changes: 5 additions & 4 deletions eq.lib.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* This file is part of the eQual framework.
* https://github.com/cedricfrancoys/equal
* https://github.com/equalframework/equal
*
* Some Rights Reserved, Cedric Francoys, 2010-2021
* Licensed under GNU LGPL 3 license <http://www.gnu.org/licenses/>
* Some Rights Reserved, The eQual Framework, 2010-2024
* Original Author: Cedric Francoys
* License: GNU LGPL 3 license <http://www.gnu.org/licenses/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -870,7 +871,7 @@ public static function announce(array $announcement) {
$access = $container->get('access');
if(!$access->isRequestCompliant($user_id, $request->getHeaders()->getIpAddress())) {
Reporter::errorHandler(EQ_REPORT_SYSTEM, "AAA::".json_encode(['type' => 'policy', 'status' => 'denied']));
throw new Exception("Request rejected by Security Policies", EQ_ERROR_NOT_ALLOWED);
throw new \Exception("Request rejected by Security Policies", EQ_ERROR_NOT_ALLOWED);
}
else {
Reporter::errorHandler(EQ_REPORT_SYSTEM, "AAA::".json_encode(['type' => 'policy', 'status' => 'accepted', 'policy_id' => $access->getComplyingPolicyId()]));
Expand Down
8 changes: 7 additions & 1 deletion lib/equal/access/AccessController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use core\security\SecurityPolicy;
use core\security\SecurityPolicyRule;
use core\security\SecurityPolicyRuleValue;
use core\setting\Setting;
use equal\orm\ObjectManager;
use equal\organic\Service;
use equal\services\Container;
Expand Down Expand Up @@ -731,7 +732,7 @@ public function isRequestCompliant($user_id, $ip_address) {
$result = true;
$time = time();

// fetch policies: request must be compliant with at least one policy.
// fetch security policies: request must be compliant with at least one policy.
/** @var \equal\orm\ObjectManager */
$orm = $this->container->get('orm');
$security_policies_ids = $orm->search(SecurityPolicy::getType(), [['is_active', '=', true]]);
Expand Down Expand Up @@ -826,6 +827,11 @@ private function validateTimeRange($time, $pattern) {
list($hours, $minutes) = explode(':', date('H:i', $time));
$time_of_day = ($hours * 3600) + ($minutes * 60);

// retrieve timezone offset between local timezone and UTC (times in settings use local time)
$tz = new \DateTimeZone(Setting::get_value('core', 'locale', 'time_zone', 'Europe/Brussels'));
// apply timezone offset, in seconds to apply, depending on the date of the given date (based on received timestamp)
$time_of_day += $tz->getOffset(new \DateTime('@'.$time));

$map_days = ['sun' => 0, 'mon' => 1, 'tue' => 2, 'wed' => 3, 'thu' => 4, 'fri' => 5, 'sat' => 6];

$day_of_week = strtolower(date('D', $time));
Expand Down
Loading