diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..ff1c007905 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +.gitattributes export-ignore +.gitignore export-ignore +.github export-ignore +.jelixlocales.ini export-ignore +.gitlab-ci.yml export-ignore +.php-cs.dist export-ignore +phpstan.neon export-ignore +./tests export-ignore diff --git a/.github/ISSUE_TEMPLATE/1_bug-form.yml b/.github/ISSUE_TEMPLATE/1_bug-form.yml new file mode 100644 index 0000000000..80a5589783 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_bug-form.yml @@ -0,0 +1,96 @@ +name: 🐞 Bug Report +description: Report errors and problems. The more precise is your bug report, the more quickly it will be fixed. +title: "[Bug]: " +labels: [bug] +body: + + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + Tip: small projects and screenshots/gifs help a lot debugging ;) + QGIS project must be valid. Project => Properties => QGIS Server => Test Configuration => Launch + + - type: textarea + id: what + attributes: + label: What is the bug? + placeholder: When clicking on button... + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce the issue + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: textarea + id: versions + attributes: + label: Versions + description: | + Go in QGIS Desktop, then Lizmap plugin, right click on your server, then "Copy versions in the clipboard". Finally paste here. There isn't any personal data provided. + Check any messages displayed by the plugin if any. Read https://docs.lizmap.com/current/en/publish/lizmap_plugin/information.html#request-for-support + validations: + required: true + + - type: checkboxes + id: lizmap-plugin + attributes: + label: Check Lizmap plugin + options: + - label: I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed. +# required: true + + - type: input + id: qgis-server-version + attributes: + label: QGIS server version, only if the section above doesn't mention the QGIS Server version + placeholder: 3.16.8 + + - type: input + id: os + attributes: + label: Operating system + placeholder: Ubuntu 20.04, Windows 10, ... + validations: + required: true + + - type: dropdown + id: browsers + attributes: + label: Browsers + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + validations: + required: true + + - type: input + id: browsers-version + attributes: + label: Browsers version + placeholder: Firefox 89, Chrome 90, ... + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: | + WARNING: obfuscate all sensible data (IP, passwords, domain name...). + Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + To find logs in your browser, open developer console (F12 or Ctrl + Shift + I). + Lizmap error logs can be found in admin panel. + render: shell diff --git a/.github/ISSUE_TEMPLATE/2_Feature_request.md b/.github/ISSUE_TEMPLATE/2_Feature_request.md new file mode 100644 index 0000000000..32eb6b78eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_Feature_request.md @@ -0,0 +1,20 @@ +--- +name: "☝️ Feature request" +about: Suggest an idea for a new feature or an improvement. 3Liz's paid software development => https://www.3liz.com/services.html#software-dev +title: '' +labels: enhancement +assignees: '' + +--- + +### Is your feature request related to a problem? Please describe + + +### Describe the solution you'd like + + +### Describe alternatives you've considered + + +### Additional context + diff --git a/.github/ISSUE_TEMPLATE/3_Support_request.yml b/.github/ISSUE_TEMPLATE/3_Support_request.yml new file mode 100644 index 0000000000..83d5e247b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3_Support_request.yml @@ -0,0 +1,84 @@ +name: ❓ Support/Questions +description: Questions about using or installing Lizmap. 3Liz's paid support => https://www.3liz.com/services.html#3liz-support-offer +title: "[Question]: " +labels: [question] +body: + + - type: markdown + attributes: + value: | + Before asking your question, please check that the response is not in the documentation: https://docs.3liz.com/ + + Questions about using or installing Lizmap. 3Liz's paid support => https://www.3liz.com/services.html#3liz-support-offer + + - type: textarea + id: what + attributes: + label: What is the question? + placeholder: When clicking on button... + validations: + required: true + + - type: textarea + id: versions + attributes: + label: Versions + description: | + Go in QGIS Desktop, then Lizmap plugin, right click on your server, then "Copy versions in the clipboard". Finally paste here. There isn't any personal data provided. + Check any messages displayed by the plugin if any. Read https://docs.lizmap.com/current/en/publish/lizmap_plugin/information.html#request-for-support + validations: + required: true + + - type: checkboxes + id: lizmap-plugin + attributes: + label: Check Lizmap plugin + options: + - label: I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed. +# required: true + + - type: input + id: qgis-server-version + attributes: + label: QGIS server version, only if the section above doesn't mention the QGIS Server version + placeholder: 3.16.8 + + - type: input + id: os + attributes: + label: Operating system + placeholder: Ubuntu 20.04, Windows 10, ... + validations: + required: true + + - type: dropdown + id: browsers + attributes: + label: Browsers + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + validations: + required: true + + - type: input + id: browsers-version + attributes: + label: Browsers version + placeholder: Firefox 89, Chrome 90, ... + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: | + WARNING: obfuscate all sensible data (IP, passwords, domain name...). + Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + To find logs in your browser, open developer console (F12 or Ctrl + Shift + I). + Lizmap error logs can be found in admin panel. + render: shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..7ca3a950c1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Documentation + url: https://github.com/3liz/lizmap-documentation/issues + about: Please fill an issue about documentation here. + - name: Lizmap QGIS plugin issue + url: https://github.com/3liz/lizmap-plugin/issues + about: Please fill an issue about Lizmap QGIS plugin here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..4589a0cd17 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ + + +Ticket : # + +Funded by diff --git a/.github/auto_milestone.py b/.github/auto_milestone.py new file mode 100755 index 0000000000..d18bff8309 --- /dev/null +++ b/.github/auto_milestone.py @@ -0,0 +1,68 @@ +#!/usr/bin/python3 + +import os +import requests + +from typing import Optional + +from pkg_resources.extern import packaging + + +def parse_branch(branch: str, milestones_available: list) -> Optional[packaging.version.Version]: + """ Returns the milestones available according to the branch name, otherwise None. """ + if branch == 'master': + return milestones_available[-1] + + try: + branch = branch.replace('release_', '').replace('_', '.') + branch = packaging.version.Version(branch) + for m in milestones_available: + if m.major == branch.major and m.minor == branch.minor: + return m + except Exception as e: + print(e) + + +def all_gh_milestones(token: str, repo: str): + r = requests.get( + f"https://api.github.com/repos/{repo}/milestones", + headers={ + 'Authorization': f'Bearer {token}' + } + ) + milestones = r.json() + github_valid_milestones = [] + for m in milestones: + if len(m['title'].split('.')) != 3: + continue + + try: + github_valid_milestones.append(packaging.version.Version(m['title'])) + except packaging.version.InvalidVersion: + continue + github_valid_milestones.sort() + return github_valid_milestones, milestones + + +if __name__ == "__main__": + token = os.getenv("GITHUB_TOKEN") + repo = os.getenv("GITHUB_REPOSITORY") + base_branch = os.getenv("GITHUB_BASE") + gh_milestones, gh_milestones_object = all_gh_milestones(token=token, repo=repo) + final_milestone = parse_branch(base_branch, gh_milestones) + + print(f"Found milestone {final_milestone} for base branch {base_branch}") + + milestone_id = None + for milestone in gh_milestones_object: + if milestone['title'] == str(final_milestone): + milestone_id = milestone['number'] + break + + if not milestone_id: + exit(0) + + print(f"Retuning milestone {final_milestone} wih ID {milestone_id}") + + with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: + print(f'milestone_number={milestone_id}', file=fh) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..27f859e9da --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + assignees: + - "Gustry" + + - package-ecosystem: "composer" + directory: "/lizmap" + schedule: + interval: "monthly" +# assignees: +# - "laurentj" + + - package-ecosystem: "composer" + directory: "/tests/units" + schedule: + interval: "monthly" + +# - package-ecosystem: "npm" +# directory: "/assets" +# schedule: +# interval: "monthly" +# assignees: +# - "nboisteault" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..5bf0d70b7c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,48 @@ +"administration pages": + - any: [ + 'lizmap/modules/admin/**', + ] + +"CI & packages": + - any: [ + '.github/**', + '.gitlab-ci.yml', + 'Makefile', + ] + +"data editor": + - any: [ + 'lizmap/modules/lizmap/lib/Form/**', + ] + +"dataviz": + - any: [ + 'lizmap/modules/dataviz/**', + 'lizmap/www/assets/js/dataviz/**', + ] + +"docker": + - any: [ + 'docker/**', + ] + +"javascript": + - any: [ + 'assets/**', + 'lizmap/www/assets/js/**', + 'assets/src/modules/**', + 'tests/js-units/**', + ] + +#"run cypress": +# - any: ['tests/end2end/**/*'] + +"QGIS Server": + - any: [ + 'lizmap/modules/lizmap/lib/Request/**', + ] + +"tests": + - any: [ + 'tests/**', + ] diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 0000000000..c786755d9f --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,17 @@ +name: ♻ Backport +on: + pull_request_target: + types: + - closed + +jobs: + backport: + runs-on: ubuntu-latest + name: Backport + steps: + - name: Backport Bot + id: backport + uses: m-kuhn/backport@v1.2.7 + with: + github_token: ${{ secrets.BOT_HUB_TOKEN }} + add_labels: 'backport' diff --git a/.github/workflows/cron_e2e.yml b/.github/workflows/cron_e2e.yml new file mode 100644 index 0000000000..4583b8b09c --- /dev/null +++ b/.github/workflows/cron_e2e.yml @@ -0,0 +1,29 @@ +name: "⏰ End2end" +on: + workflow_dispatch: + schedule: + # Run every monday at 3:00 + - cron: '0 3 * * 1' + +jobs: + cron-e2e: + runs-on: ubuntu-latest + steps: + + - name: Branch master + uses: peter-evans/repository-dispatch@v2 + with: + event-type: run-e2e-branches + client-payload: '{"branch": "master"}' + + - name: Branch 3.7 + uses: peter-evans/repository-dispatch@v2 + with: + event-type: run-e2e-branches + client-payload: '{"branch": "release_3_7"}' + + - name: Branch 3.6 + uses: peter-evans/repository-dispatch@v2 + with: + event-type: run-e2e-branches + client-payload: '{"branch": "release_3_6"}' diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml new file mode 100644 index 0000000000..93f6c0b8d7 --- /dev/null +++ b/.github/workflows/e2e_tests.yml @@ -0,0 +1,181 @@ +name: "🎳 End2end" +on: + pull_request: + types: [ labeled, opened, synchronize, reopened ] + branches: + - master + - release_3_* + workflow_dispatch: + repository_dispatch: + types: [ run-e2e-branches ] + +jobs: + end2end: + # The first condition is triggered when we set the new label + # The second one when we update the PR with new commits without changing labels + # The third one when external workflow + # The fourth one is for the manual button + if: | + github.event.label.name == 'run end2end' || + contains(github.event.pull_request.labels.*.name, 'run end2end') || + github.event_name == 'repository_dispatch' || + github.event_name == 'workflow_dispatch' + name: "End-to-end" + runs-on: ubuntu-latest + defaults: + run: + working-directory: tests + env: + CYPRESS_CI: TRUE + # For testing only + # PHP_VERSION: 8.2 + # LZMPOSTGISVERSION: 15-3 + # LZMQGSRVVERSION: 3.34 + + steps: + +# - name: Debug +# working-directory: . +# run: | +# echo ${{ github.event.pull_request.head.sha }} +# echo ${{ github.head_ref }} +# echo ${{ github.ref_name }} + + - name: Define branch name from env for the checkout + working-directory: . + run: | + if ${{ github.event_name == 'repository_dispatch' }} + then + # repository_dispatch is from an external workflow, for instance a cron workflow + echo "Set branch from manual input: ${{ github.event.client_payload.branch }}" + BRANCH="${{ github.event.client_payload.branch }}" + elif ${{ github.event_name == 'workflow_dispatch' }} + then + # workflow_dispatch is the the button in UI + echo "Set branch from default value: ${{ github.ref }}" + BRANCH="${{ github.ref }}" + else + # From a PR + echo "Event type ${{ github.event_name }}" + echo "Set branch from default value : ${{ github.event.pull_request.head.sha }} " + BRANCH="${{ github.event.pull_request.head.sha }}" + fi + echo "BRANCH=${BRANCH}" >> $GITHUB_ENV + + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ env.BRANCH }} + token: ${{ secrets.BOT_HUB_TOKEN || github.token }} # Important to launch CI on a commit from a bot + + - name: Branch name + run: echo running on branch ${GITHUB_REF##*/} with CYPRESS = ${CYPRESS_CI} + + - name: Make environment and show Lizmap versions + run: | + make env + cat .env + + # For testing only +# - name: Update projects +# run: | +# make upgrade-projects +# git status + + - name: Install QGIS server plugins + run: make build-plugins + + - name: Show QGIS server environment + run: | + make show-qgis-server-versions + + - name: Pull docker images + run: ./run-docker pull + + - name: Build and start docker images + run: ./run-docker up --build -d + + - name: Wait docker images ready and install Lizmap + run: sleep 30 && ./lizmap-ctl install + + - name: Load SQL data + run: cd qgis-projects/tests && ./load_sql.sh + + - name: Add hosts to /etc/hosts + run: | + sudo echo "127.0.0.1 othersite.local" | sudo tee -a /etc/hosts + + # Playwright + - uses: actions/setup-node@v4 + + - name: Install dependencies + run: cd end2end && npm ci + + - name: Install Playwright + run: cd end2end && npx playwright install --with-deps chromium + + - name: Run Playwright tests + id: test-playwright + run: cd end2end && npx playwright test --project=chromium + + - name: Notify in case of playwright failure, from mainstream branches only + uses: peter-evans/commit-comment@v3 + if: github.repository == '3liz/lizmap-web-client' && failure() && steps.test-playwright.outcome != 'success' && github.event_name == 'repository_dispatch' + with: + token: ${{ secrets.BOT_HUB_TOKEN }} + body: | + The latest **weekly** run of end2end "playwright" tests failed with this latest commit on the branch **${{ env.BRANCH }}** 😣 + + CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ? + + Visit ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v3.1.3 + with: + name: playwright-report + path: tests/end2end/playwright-report + + # Install NPM dependencies, cache them correctly + # and run all Cypress tests + - name: Cypress run + id: test-cypress + # Always run, even if playwright has failed + if: always() + uses: cypress-io/github-action@v5.8.3 + with: + working-directory: tests/end2end + spec: cypress/integration/*-ghaction.js + wait-on: http://localhost:8130 + + - name: Notify in case of cypress failure, from mainstream branches only + uses: peter-evans/commit-comment@v3 + if: github.repository == '3liz/lizmap-web-client' && failure() && steps.test-cypress.outcome != 'success' && github.event_name == 'repository_dispatch' + with: + token: ${{ secrets.BOT_HUB_TOKEN }} + body: | + The latest **weekly** run of end2end "cypress" tests failed with this latest commit on the branch **${{ env.BRANCH }}** 😣 + + CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ? + + Visit ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + - name: Save screenshots as artifacts if a test fails to ease debug + uses: actions/upload-artifact@v3.1.3 + if: failure() + with: + name: cypress-screenshots + path: | + tests/end2end/cypress/screenshots + tests/end2end/cypress/downloads + +# debug: +# name: "Debug" +# runs-on: ubuntu-latest +# steps: +# - name: Dump GitHub context +# env: +# GITHUB_CONTEXT: ${{ toJson(github) }} +# run: | +# echo "$GITHUB_CONTEXT" diff --git a/.github/workflows/feedback_issue.yml b/.github/workflows/feedback_issue.yml new file mode 100644 index 0000000000..dcb00faec0 --- /dev/null +++ b/.github/workflows/feedback_issue.yml @@ -0,0 +1,20 @@ +name: "🚮 Close feedback issues" +on: + schedule: + - cron: "0 4 * * 2,5" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v8.0.0 + with: +# repo-token: ${{ secrets.BOT_HUB_TOKEN }} + days-before-stale: 30 + days-before-close: 7 + operations-per-run: 10 + stale-issue-message: | + This issue is missing some feedbacks. 👻 + Please have a look to the discussion, thanks. 🦎 + stale-issue-label: 'stale' + only-labels: 'feedback' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..b38f305923 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,27 @@ +name: "🌈 Labeler" + +on: + pull_request_target: + types: [ opened, synchronize, reopened ] + branches: + - master + - release_3_* + +jobs: + triage: + name: "Triage" + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + + - name: Sleep for 5 minutes + # The action is not going to conflict with manually set labels when creating the PR + run: sleep 5m + shell: bash + + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: '' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..1f677b76a5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +name: "🔤 Lint" + +on: + push: + branches: + - master + - release_3_* + pull_request: + branches: + - master + - release_3_* + +jobs: + php-cs-fixer: + name: "PHP-CS-Fixer" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "PHP-CS-Fixer" + uses: docker://oskarstark/php-cs-fixer-ga:3.8.0 + with: + args: --config=.php-cs-fixer.dist.php --allow-risky=yes --dry-run --diff diff --git a/.github/workflows/milestone.yml b/.github/workflows/milestone.yml new file mode 100644 index 0000000000..97863cb6be --- /dev/null +++ b/.github/workflows/milestone.yml @@ -0,0 +1,41 @@ +name: 🚓 Milestone + +on: + pull_request_target: + types: + - opened + - reopened + - synchronize + +jobs: + pr: + runs-on: ubuntu-latest + if: github.repository == '3liz/lizmap-web-client' + continue-on-error: true + steps: + - uses: actions/checkout@v4 + with: + ref: 'master' + fetch-depth: 0 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Get milestone + id: milestone + run: ./.github/auto_milestone.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_BASE: ${{ github.event.pull_request.base.ref }} + + - name: Update PR milestone + uses: octokit/request-action@v2.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + route: PATCH /repos/${{ github.repository }}/issues/${{github.event.number}} + pull_number: ${{github.event.number}} + milestone: ${{ steps.milestone.outputs.milestone_number }} diff --git a/.github/workflows/php-stan.yml b/.github/workflows/php-stan.yml new file mode 100644 index 0000000000..24ab90c159 --- /dev/null +++ b/.github/workflows/php-stan.yml @@ -0,0 +1,72 @@ +name: "🐘 PHPStan" + +on: + workflow_dispatch: + push: + branches: + - master + - release_3_* + pull_request: + branches: + - master + - release_3_* + +defaults: + run: + working-directory: ./lizmap + +jobs: + phpstan: + name: "Analyze" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Get composer cache directory + id: get-composer-cache-dir + run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_ENV + + - name: Setup PHP with tools + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: phpstan + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ env.composer_cache_dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: PHPStan version + run: | + phpstan -V + echo "PHPSTAN_VERSION=$(phpstan -V)" >> $GITHUB_ENV + + - name: Run PHPStan + id: test-phpstan + run: phpstan analyse -c ../phpstan.neon + + - name: Notify in case of failure + uses: peter-evans/commit-comment@v3 + if: failure() + with: + body: | + The latest run of **PHPStan** has **failed**, maybe it's due to a newer version released recently 😣 + Current version used on CI : + + > ${{ env.PHPSTAN_VERSION }} + + https://github.com/phpstan/phpstan/releases + + Have a look to **your** current version of PHPStan like : + + ➡ `docker exec CONTAINER_test_php tests/units/vendor/phpstan/phpstan/phpstan -V` + + And update if needed : + + ➡ `./lizmap-ctl composer-update` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..59d130b62a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: 🚀 Release + +on: + push: + tags: + - '*' + +jobs: + packaging: + runs-on: ubuntu-latest + if: github.repository == '3liz/lizmap-web-client' + + steps: + + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + +# - name: Tweet +# uses: mugi111/tweet-trigger-release@v1.2 +# with: +# consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }} +# consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }} +# access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} +# access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} +# tweet_body: "New version of @LizmapForQgis ${{ env.RELEASE_VERSION }} 🦎 for #QGIS https://github.com/3liz/lizmap-web-client/releases/tag/${{ env.RELEASE_VERSION }}" + + - uses: actions/checkout@v4 + with: + ref: versions + fetch-depth: 0 + token: ${{ secrets.BOT_HUB_TOKEN }} + + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Add the version + run: ./add_version.py ${{ env.RELEASE_VERSION }} + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Publish ${{ env.RELEASE_VERSION }}" + commit_user_name: ${{ secrets.BOT_NAME }} + commit_user_email: ${{ secrets.BOT_MAIL }} + commit_author: ${{ secrets.BOT_NAME }} diff --git a/.github/workflows/stale_issue.yml b/.github/workflows/stale_issue.yml new file mode 100644 index 0000000000..2edfa6fcc1 --- /dev/null +++ b/.github/workflows/stale_issue.yml @@ -0,0 +1,24 @@ +name: "🌀 Close stale issues" +on: + schedule: + - cron: "0 4 * * 1,3" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v8.0.0 + with: +# repo-token: ${{ secrets.BOT_HUB_TOKEN }} + days-before-stale: 180 + days-before-close: 15 + operations-per-run: 10 + stale-issue-message: | + Hiya! + This issue has gone quiet. 👻 + We get a few questions in the bug tracker, we are currently slowly closing issues. + If we missed this issue or if you want to keep it open, please reply here. + As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. + Thanks for being a part of the Lizmap community! 🦎 + stale-issue-label: 'stale' + exempt-issue-labels: 'bug,enhancement,doc-needed,new feature,Feature request' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..932121a0fa --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,54 @@ +name: "🎳 Unit tests" + +on: + push: + branches: + - master + - release_3_* + pull_request: + branches: + - master + - release_3_* + +jobs: + php-tests: + name: "🐘 PHP-Unit" + runs-on: ubuntu-latest + strategy: + matrix: + php-version: [ + '8.0', + '8.1', + '8.2', + ] + steps: + + - name: Check out repository + uses: actions/checkout@v4 + + - name: Setup PHP with tools + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: php-cs-fixer, phpunit + + - name: Running tests + run: make tests + + js-tests: + name: "🟨 JS-Unit" + runs-on: ubuntu-latest + steps: + + - name: Check out repository + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + + - name: Install dependencies + working-directory: tests/js-units + run: npm install + + - name: Running tests + working-directory: tests/js-units + run: npm run js:test diff --git a/.github/workflows/unstale.yml b/.github/workflows/unstale.yml new file mode 100644 index 0000000000..d973ca9c4e --- /dev/null +++ b/.github/workflows/unstale.yml @@ -0,0 +1,15 @@ +name: ♻ Remove Labels + +on: [issue_comment] + +jobs: + remove_labels: + if: contains(github.event.issue.labels.*.name, 'stale') + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-remove-labels@v1 + if: ${{ github.event.comment.user.url != 'https://github.com/apps/github-actions' }} + with: + github_token: ${{ secrets.BOT_HUB_TOKEN }} + labels: | + stale diff --git a/.gitignore b/.gitignore index 35af1c509f..a7844059a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# IDE +.idea +.vscode/ + *.orig *.rej *~ @@ -6,11 +10,114 @@ *.swp *.log *.pyc +*.bak + +# Build +build/ +assets/node_modules/ + +# Config lizmap/var/config/lizmapConfig.ini.php lizmap/var/config/localconfig.ini.php +lizmap/var/config/liveconfig.ini.php +lizmap/var/config/localframework.ini.php lizmap/var/config/profiles.ini.php lizmap/var/config/installer.ini.php +lizmap/var/config/installer.bak.ini.php +lizmap/var/config/localurls.xml lizmap/var/db/*.db lizmap/var/lizmap-theme-config/* +!lizmap/var/lizmap-theme-config/.empty +lizmap/var/mails/* +!lizmap/var/mails/.empty +lizmap/var/sessions/* +!lizmap/var/sessions/.empty +lizmap/var/uploads/* +!lizmap/var/uploads/.empty +lizmap/www/cache/images/* +!lizmap/www/cache/images/.empty +lizmap/www/live/images/home/* +!lizmap/www/live/images/home/.empty + +# Built JS files +lizmap/www/assets/js/lizmap.js +lizmap/www/assets/js/lizmap.js.map +lizmap/www/assets/js/lizmap.js.LICENSE.txt +lizmap/www/assets/js/action.js +lizmap/www/assets/js/action.js.map +lizmap/www/assets/js/atlas.js +lizmap/www/assets/js/atlas.js.map +lizmap/www/assets/js/attributeTable.js +lizmap/www/assets/js/attributeTable.js.map +lizmap/www/assets/js/bottom-dock.js +lizmap/www/assets/js/bottom-dock.js.map +lizmap/www/assets/js/edition.js +lizmap/www/assets/js/edition.js.map +lizmap/www/assets/js/filter.js +lizmap/www/assets/js/filter.js.map +lizmap/www/assets/js/map.js +lizmap/www/assets/js/map.js.map +lizmap/www/assets/js/map.js.LICENSE.txt +lizmap/www/assets/js/search.js +lizmap/www/assets/js/search.js.map +lizmap/www/assets/js/switcher-layers-actions.js +lizmap/www/assets/js/switcher-layers-actions.js.map +lizmap/www/assets/js/timemanager.js +lizmap/www/assets/js/timemanager.js.map +lizmap/www/assets/js/view.js +lizmap/www/assets/js/view.js.map + temp/lizmap/* !temp/lizmap/.empty +lizmap/vendor/ +lizmap/composer.lock +lizmap/lizmap-modules/* +!lizmap/lizmap-modules/.empty +lizmap/my-packages/* +!lizmap/my-packages/composer.json.dist +!lizmap/my-packages/README.md +.php-cs-fixer.php +.php-cs-fixer.cache +.phpstan.cache + +.drafts +docker/factory.manifest +docker/.run +docker/*.zip + +# Python +.venv +venv + +# Tests +tests/units/vendor/ +tests/units/composer.lock +tests/units/.phpunit.result.cache +tests/qgis-projects/* +# Zip file coming with QGIS 3.28 +tests/qgis-projects/*/*_attachments.zip +!tests/qgis-projects/tests +!tests/qgis-projects/webdav +tests/qgis-projects/webdav/test/* +!tests/qgis-projects/webdav/test/logo.png +!tests/qgis-projects/webdav/test/test_upload.conf +!tests/qgis-projects/webdav/test/test_upload.txt +!tests/qgis-projects/ProJets 1982*! +tests/qgis-projects/tests/media +tests/qgis-server-plugins/* +!tests/qgis-server-plugins/upgrade_projects.py +tests/lizmap-qgis-plugin.master.zip +tests/end2end/node_modules/ +tests/end2end/cypress/downloads/ +tests/end2end/cypress/screenshots/ +tests/js-units/node_modules/ +tests/.env +tests/end2end/playwright-report/ +tests/end2end/playwright/.auth +tests/end2end/test-results + +/.composer +/.npm + + +*.code-workspace diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..40d6b2b3b2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,230 @@ +stages: +- build +- tests +- package +- docker-image +- deploy +- release +- post-release + +cache: + key: "$CI_COMMIT_REF_SLUG" + paths: + - lizmap/vendor/ + - assets/node_modules/ + +build: + stage: build + script: + - make build + environment: + name: snap + artifacts: + name: "lizmap-web-client-${CI_COMMIT_SHA}-js" + paths: + - lizmap/www/assets/js/lizmap.js + - lizmap/www/assets/js/lizmap.js.map + - lizmap/www/assets/js/action.js + - lizmap/www/assets/js/action.js.map + - lizmap/www/assets/js/atlas.js + - lizmap/www/assets/js/atlas.js.map + - lizmap/www/assets/js/attributeTable.js + - lizmap/www/assets/js/attributeTable.js.map + - lizmap/www/assets/js/bottom-dock.js + - lizmap/www/assets/js/bottom-dock.js.map + - lizmap/www/assets/js/edition.js + - lizmap/www/assets/js/edition.js.map + - lizmap/www/assets/js/filter.js + - lizmap/www/assets/js/filter.js.map + - lizmap/www/assets/js/map.js + - lizmap/www/assets/js/map.js.map + - lizmap/www/assets/js/search.js + - lizmap/www/assets/js/search.js.map + - lizmap/www/assets/js/switcher-layers-actions.js + - lizmap/www/assets/js/switcher-layers-actions.js.map + - lizmap/www/assets/js/timemanager.js + - lizmap/www/assets/js/timemanager.js.map + - lizmap/www/assets/js/view.js + - lizmap/www/assets/js/view.js.map + tags: + - fabric + +tests: + stage: tests + script: + - make tests + environment: + name: snap + cache: + key: "tests-$CI_COMMIT_REF_SLUG" + paths: + - tests/units/vendor/ + - tests/units/composer.lock + dependencies: + - build + tags: + - fabric + +package: + stage: package + script: + - make clean ci_package + environment: + name: snap + dependencies: + - build + - tests + artifacts: + name: "lizmap-web-client-${CI_COMMIT_SHA}" + paths: + - "build/*.zip" + - "build/MANIFEST" + - "build/*.manifest" + only: + - /^release_.*$/ + - master + - tags + tags: + - fabric + +docker-image-unstable: + stage: docker-image + script: + - make docker-build-ci docker-deliver docker-clean + #- make docker-hub + environment: + name: snap + artifacts: + paths: + - docker/factory.manifest + dependencies: + - package + only: + - /^release_.*$/ + - master + except: + - tags + tags: + - infrav3 + +docker-image-release: + stage: docker-image + script: + - make docker-build-ci docker-deliver docker-clean-all DO_RELEASE=y + environment: + name: snap + artifacts: + paths: + - docker/factory.manifest + dependencies: + - package + only: + - tags + tags: + - infrav3 + +deploy-package-unstable: + stage: deploy + script: + - make deploy_download + - make saas_deploy_snap + environment: + name: snap + dependencies: + - package + only: + - /^release_.*$/ + - master + except: + - tags + tags: + - fabric + +deploy-docker-unstable: + stage: deploy + script: + - $FACTORY_SCRIPTS/update-service lizmap + environment: + name: snap + dependencies: + - docker-image-unstable + only: + - /^release_.*$/ + - master + except: + - tags + tags: + - infrav3 + +deploy-quick-release: + stage: release + script: + - make saas_release DO_RELEASE=y + environment: + name: production + dependencies: + - package + only: + - /^release_.*$/ + tags: + - fabric + except: + - tags + when: manual + + +deploy-release: + stage: release + script: + - make deploy_download_stable + - make saas_release DO_RELEASE=y + environment: + name: production + dependencies: + - package + tags: + - fabric + only: + - tags + when: manual + +docker-release: + stage: release + script: + - make docker-release + environment: + name: production + dependencies: + - docker-image-release + when: manual + only: + - tags + tags: + - infrav3 + +tickets: + stage: release + only: + - tags + image: + name: $REGISTRY_URI/infra/ci-tools:latest + script: + - create_ticket.py + tags: + - factory-plain + variables: + FACTORY_PRODUCT_NAME: lizmap-web-client + FACTORY_PACKAGE_TYPE: application + +github_release: + stage: post-release + needs: + - job: deploy-release + only: + - tags + image: + name: $REGISTRY_URI/infra/ci-tools:latest + script: + - lwc_release.py + tags: + - factory-plain diff --git a/.jelixlocales.ini b/.jelixlocales.ini new file mode 100644 index 0000000000..67c8d1e006 --- /dev/null +++ b/.jelixlocales.ini @@ -0,0 +1,30 @@ +applicationPath=lizmap/ +projectId=Lizmap Web Client 3.5 + +propertiesFileHeader="Please don't modify this file. +To contribute on translations, go to https://www.transifex.com/3liz-1/lizmap-locales/ and https://www.transifex.com/3liz-1/jelix/" + +[default] +mainLocale=en_US +translationLocation=@app-locales + +[module:action] +path=modules/action/ + +[module:admin] +path=modules/admin/ + +[module:dataviz] +path=modules/dataviz/ + +;[module:dynamicLayers] +;path=modules/dynamicLayers/ + +[module:filter] +path=modules/filter/ + +[module:lizmap] +path=modules/lizmap/ + +[module:view] +path=modules/view/ diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000000..360dbddc7d --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,62 @@ +notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php') + ->in(array( + __DIR__.'/lizmap/modules/admin', + __DIR__.'/lizmap/modules/dataviz', + __DIR__.'/lizmap/modules/dynamicLayers', + __DIR__.'/lizmap/modules/lizmap', + __DIR__.'/lizmap/modules/view', + __DIR__.'/lizmap/plugins/', + __DIR__.'/lizmap/app/responses', + __DIR__.'/lizmap/scripts/', + )) + //->exclude(__DIR__.'/lizmap/modules/proj4php/classes/') + ; + +$config = new PhpCsFixer\Config(); +return $config + ->setCacheFile(__DIR__.'/.php-cs-fixer.cache') + ->setRules([ + '@PSR2' => true, + '@Symfony' => true, + '@PhpCsFixer' => true, + 'array_syntax' => array('syntax'=>'long'), + 'method_argument_space'=> ['on_multiline' => 'ensure_fully_multiline'], + 'new_with_braces'=> true, + 'no_whitespace_in_blank_line'=> true, + 'no_whitespace_before_comma_in_array'=> true, + 'no_useless_return' => true, + 'no_unneeded_final_method'=> false, + 'no_unset_cast' => false, + 'no_leading_import_slash'=> true, + 'no_leading_namespace_whitespace'=> true, + 'no_extra_blank_lines'=> true, + 'no_empty_statement'=> true, + 'no_empty_comment'=> true, + 'object_operator_without_whitespace' => true, + 'ordered_class_elements' => false, + 'phpdoc_var_without_name' => true, + 'phpdoc_types' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_no_empty_return' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'protected_to_private' => false, + 'semicolon_after_instruction' => true, + 'short_scalar_cast' => true, + 'simplified_null_return' => false, + 'simple_to_complex_string_variable' => false, + 'standardize_not_equals' => true, + 'standardize_increment' => true, + 'whitespace_after_comma_in_array' => true, + 'yoda_style'=>array( + 'always_move_variable' => false, + 'equal' => false, + 'identical' => false, + 'less_and_greater' => null, + ) + ]) + ->setFinder($finder) + ; diff --git a/CHANGELOG-3.3.md b/CHANGELOG-3.3.md new file mode 100644 index 0000000000..d17fd977e3 --- /dev/null +++ b/CHANGELOG-3.3.md @@ -0,0 +1,96 @@ +# Changelog Lizmap 3.3 + +## 3.3.16 - 2021-06-17 + +- Fix: some IGN base layers with free keys could not be displayed +- Fix: always display form filters in the same order +- Fix: remove spaces at begin and end in registration login before using it +- Fix: lizmap stop loading baselayers from WMS source or XML file +- Fix: form filter no more fails when using text values with multiple single quote +- Fix: tabs in anchored popup were not toggling + +## 3.3.15 - 2021-03-25 + +- Fix database migrator: sequence should be updated +- Update Jelix to fix an issue in the installer +- Fix 'Undefined index' notice + +## 3.3.14 - 2021-03-04 + +- Fix the sqlite to pgsql migrator +- Fix some issues with PHP 8.0 and PHP 7.x +- Fix geobookmark sql: remove explicit public schema +- Fix the latest issues with rights management in some specific case +- Improved the interface management to be more understandable + +## 3.3.13 - 2021-01-14 + +- Fix assert crs is not empty before loading +- Remove warning about lizmap_search +- Fix issues with rights managements: removing rights to manage rights, from all + users, was still possible in specific case. +- new config parameter to disable the behavior change of the login page, + introduced in lizmap 3.3.12, which redirect to the main page when the user + is already authenticated. You can disable it by setting `noRedirectionOnAuthenticatedLoginPage=on` + into the jcommunity section of the configuration (`localconfig.ini.php`). +- Fix attribute edition sets to null unedited fields +- Search - Use a transaction to avoid PostgreSQL connection issue + +## 3.3.12 - 2020-12-07 + +- Add 'empty-data' class in auto popup when value is empty or NULL +- Fix QGIS Date format support +- Fix delete attachment in forms +- Fix edition forms: Do not activate combobox or autocomplete on disabled select +- Fix edition forms: mandatory relational value by default +- Fix Admin export logs: there were no output with big logs table + +- Configuration form: do not allow to enable user account request when the + webmaster email is not set +- new scripts for the command line, to create a user, change or reset a password + +```bash +php scripts/script.php jcommunity~user:changePassword [--force] [] +php scripts/script.php jcommunity~user:resetPassword +php scripts/script.php jcommunity~user:create [--reset] [--admin] [--no-error-if-exist] [] +``` + +- authentication: redirect to a lizmap page when the user goes to the login + form whereas he is authenticated. +- bugs fixes from 3.2.18 + +## 3.3.11 - 2020-10-13 + +- Fix QGIS custom dates in forms +- Add zoomlevels to baselayers +- Filter : assert filters have a title +- Filter: use min_date field if max_date undefined +- Don't display filter when no data + +- Treat PostGIS view datasource containing `key='""'` as `key=''` +- Remove wps module from docker image +- Fix broken link to IGN image in attribution +- Datepicker i18n,call getCurrentLang() once +- Fix the user table name into the Sqlite to Postgresql migrator +- localization updated. New supported language: Slovak + +## 3.3.10 - 2020-08-31 + +- Fix account management (module jCommunity 1.3.5): + - Hide reset password links in user profile when password change is not possible + - Fix configuration reading +- Fix wrong ordering of attributes where the first letter has an accent in filter form + +- Update some libraries to fix some bugs : + - Upgrade jQuery File Upload to version 10.31.0 + - Update Jelix: + - you can indicate a database name in a connection profile + when using Postgresql services. + - fix a security issue when redirecting to a page after authentication + - upgrade jCommunity to 1.2.4 to fix some low security issues during login +- Fix an error on SQL queries during the migration of user table from Sqlite to Postgresql +- Don't sort values with ValueMap widget to keep order defined in QGIS +- Use form in edition.js to get it's id +- A new command to test the mailer configuration: + php scripts/script.php jelix~mailer:test your.email@example.com +- Fix show feature count diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md new file mode 100644 index 0000000000..d12a4fea26 --- /dev/null +++ b/CHANGELOG-3.4.md @@ -0,0 +1,356 @@ +# Changelog Lizmap 3.4 + +## Unreleased + +## 3.4.14 - 2022-10-18 + +### Fixed + +* Fix wrong host URL when the WMS is used in another GIS client such as QGIS + +### Backend + +* Upgrade Jelix to version 1.6.39 + +## 3.4.13 - 2022-09-20 + +### Fixed + +* Form filter - Use OR between the uniques values of the same field +* Fix some requests to QGIS Server +* New configuration to set up the Content Security Policy header + +### Translations + +* Update from Transifex about translated strings + +### Tests + +* Add more tests about Cypress + +### Backend + +* Update Jelix to version 1.6.38 + +## 3.4.12 - 2022-07-01 + +### Added + +* New `-dry-run` for the cache generation to see how many tiles might be generated + +### Changed + +* Improve the table in the right's management panel when having a dozen of groups +* Add tolerance for clicking on mobile to get the popup + +### Fixed + +* Fix the download of files (layer export, PDF) depending on the web-browser (and its version) +* CLI tool about cache : fix an issue about the `-bbox` parameter out of the tile matrix limit +* Provide the dataviz button in the left menu only there is at least one non filtered dataviz +* The style was not updated when the layer has a shortname and was included in a QGIS theme +* Javascript error when clicking on an atlas link when no feature ID was found +* Fix infinite HTTP loop when the user hasn't any access to the default project +* Fix the attribute table order defined in QGIS desktop +* Fix the "zoom to layer" button when the layer is in EPSG:4326 (Funded by Geocobet) + +### Backend + +* Update Jelix to version 1.6.38-pre + +### Translations + +* Update from Transifex about translated strings + +### Tests + +* Update end-to-end Cypress tests about continuous integration + +## 3.4.11 - 2022-04-29 + +### Fixed + +* Allow a project thumbnail with capital letters in the extension +* Open a PDF in a new tab when possible on Firefox instead of the internal viewer +* Fix about dataviz panel : plot order and custom plot layout, contribution from @tethysgeco +* Fix some exports issues when there is a selection +* Fix an issue about editing capabilities when using a geometry involved in a QGIS expression +* Fix about some WFS requests about vector data +* Fix about QGIS 3.22 when a group has a shortname +* Fix about QGIS 3.22 with the "Show feature count" +* Fix about geometries in WKT when it's multipart. + +### Translations + +* Update from Transifex about translated strings + +### Backend + +* Update of Jelix 1.6 + +## 3.4.10 - 2022-03-24 + +### Fixed + +- Fix when an attribute name is starting with a capital name +- Fix editing feature having an ID equal to 0 +- Do not show custom labels when printing from a popup about `lizmap_user` and `lizmap_user_groups` +- Check version attribute in WxS request in XML to return error +- Fix the GetProj4 request to get proj4 CRS definition from QGIS project +- Speed up GetProjectConfig request by using cache for QGIS Server plugins data +- Do not send private user group to QGIS Server for access control +- Fix regression in form - empty value is added to required menu list field +- Check Version parameters in WxS request to return error +- Fix the GetProjectConfig mime-type as application/json + +### Backend + +- Upgrade jelix to 1.6.36 + +## 3.4.9 - 2022-02-04 + +### Added + +- Add new Ukrainian language + +### Fixed + +- Fix the value relation widget with multiple text values on feature modification +- Fix the link of selected features between a parent and a child in the attribute table +- Fix a warning into QgisProject with expanded-group-node +- Update IGN URL searching address, the old one will no longer be usable as of February 1, 2022 +- Fix snapping missing when editing existing feature +- Fix geom can be created on existing feature without geometry +- Fix some account management issues with some other authentication modules +- Fix the backup script about third-party modules such as MapBuilder and AltiProfil +- Fix the mime type for SVG files. It should be `image/svg+xml` +- Fix the layer export when : + - a selection or a filter is active + - the layer is not spatial + - the layer has parenthesis inside its name +- Update translations + +## 3.4.8 - 2021-12-23 + +### Fixed + +- Update URLs for the French IGN basemap provider, + It's highly recommended updating before first February 2022. +- Refresh atlas input list after update layer feature +- Don't show search results if search query is empty +- Use white icons on button.btn-primary class hover +- Translate mini-dock-close button +- Selection: improve the export tool to allow bigger selections + - use the selection token instead of a list of feature identifiers + - internally use POST instead of GET requests to query data from QGIS Server + +## 3.4.7 - 2021-11-16 + +### Fixed + +- Expressions: Lizmap user and groups was not forwarded to the QGIS Server backend. + It's now possible to use `@lizmap_user` and `@lizmap_user_groups` in a QGIS Expression + in an editing form. +- External WMS layers - respect the image format of the source WMS layer. + The format specified in the Lizmap configuration is not used. +- WMS GetPrint Request: do not encode URI labels +- View Popup class: manually canonize path to authorize symlink + +### Added + +- New **save** button to let users decide if they want their drawings to be saved. + If drawings are not saved, they will be removed when the webpage is refreshed. + +## 3.4.6 - 2021-09-21 + +- Fix: issue during the installation of the ldapdao module. Upgrade it to 2.2.1 +- Fix: export button allowed in filter data with form when format is ODS +- Fix: integer key column sorted as text in attribute table tool +- Fix: Editing + - In case of more than one editable layers, when there is a filter by login (or by polygon) activated, + some of the popup items could miss the pencil button to open the editing form. Corrected by requesting + the editable features for all the editable layers of the displayed popup items, and not only the first. + +## 3.4.5 - 2021-09-14 + +- Fix: multiple selection edition w/ text field. Values can be integer but also string +- UI: when dock is closed, show edition is pending with green background on dock button +- Fix: use IGN PLANIGNV2 with free and paid keys +- UI: replace dock close button text by icon. This makes it more clear the dock is closed but tool can remain active +- Translation: add Romanian for dataTables (contribution from @ygorigor) +- Create utils method to parse XML and get error parsing message +- Fix: Object of class LibXMLError could not be converted to string +- Fix: Log errors about loading QGIS Project and provides errors messages +- Fix: lizmapTiler log errors when loading WMS GetCapabilities + +## 3.4.4 - 2021-06-17 + +- Fix: form's labels partially hidden when too long. A line break and a hyphen are now used when needed +- Fix: In QGIS 3.16, the host in datasource can be written between single quotes +- Display spinner and disable button while waiting for print. +- Fix: fields are correctly hidden when 'Do not expose via WFS' is set in QGIS >=3.16 +- Fix: QGIS >= 3.16 datasource compatibility +- Fix: Pre-generated cache is not used since Lizmap 3.4.1 +- Fix: links into mails for registration or password recovery + +## 3.4.3 - 2021-03-26 + +- Fix form not displayed when editing an existing feature +- Some fixes in the js to getprint +- Fix measurement result not shown on tablet +- Fix/performance Get only projects metadata for the landing page +- Update to Webpack 5 +- Update Jelix to fix an issue in the installer + +## 3.4.2 - 2021-03-04 + +- Fix lizmap/install/set_rights.sh: some directories were missing +- Make MultiGeometry KML importable/exportable and focus on features extent after load +- Fix geobookmark sql: remove explicit public schema +- Fix popup compact table margin-left +- Fix the adding of the user into group +- Fix visual blank line between the map and the right-dock +- Fix can't launch children layers edition from parent form +- Fix error about script.php into the docker container +- UX Display form first in edition mode for desktop and mobile +- Fix hide digitization tab for non geom layer +- Hide label in legend for layers with single symbol rendering +- Fix WMTS Request - use specific $wmsRequest parameters array + +## 3.4.1 - 2021-01-14 + +- Fix drill-down (cascading) forms in Lizmap based on QGIS expression +- Fix draw: import KML does not draw anything if xml headers +- Fix regression in 3.4.0 about Primary Keys enclosing for UPDATE RETURNING +- Fix the landing page shouldn't show project when not available for groups ACL + Users in admins groups with rights to remove repositories no longer have + access to every maps +- Fix cache does not work after authorization +- Fix edition tab content is not visible on mobile screen +- Fix regression in edition form with multiple values from relational value + +- Enhance Drag'N Drop Edition form test to avoid regression +- Enhance form_type_relational_value test + +- Fix assert crs is not empty before loading +- Remove warning about lizmap_search +- Fix issues with rights managements: removing rights to manage rights, from all + users, was still possible in specific case. +- new config parameter to disable the behavior change of the login page, + introduced in lizmap 3.3.12, which redirect to the main page when the user + is already authenticated. You can disable it by setting `noRedirectionOnAuthenticatedLoginPage=on` + into the jcommunity section of the configuration (`localconfig.ini.php`). +- Fix attribute edition sets to null unedited fields +- Search - Use a transaction to avoid PostgreSQL connection issue + +## 3.4.0 - 2020-12-18 + +### QGIS Plugin Desktop and Server + +* Changelog in the Lizmap QGIS plugin related to this new version is available + [here](https://github.com/3liz/lizmap-plugin/blob/master/CHANGELOG.md#330---25112020) + +### New features + +- Projects page + - Possibility to add HTML content on the projects page, with image upload + - Search filter : filter projects by text or tags +- Popup + - Add button to get a single table for all children's feature + - [New module `action` to run PostgreSQL actions from feature popup.](https://docs.lizmap.com/next/en/publish/configuration/action_popup.html) + This module allows to add action buttons in the popup which trigger PostgreSQL queries and return a + geometry to display on the map + - Print PDF from a popup (layout having an atlas enabled). You can now define values for custom fields +- Atlas tool + - Allow multiple atlas layer coverage +- Map view + - Improved UI for mobile. Hamburger button to toggle menu's view + - Add drawing tools in map canvas + - Possible to print these drawings (redlining) + - [QGIS theme](https://docs.qgis.org/3.16/en/docs/user_manual/introduction/general_tools.html?highlight=theme#configuring-map-themes) switcher on a map + - Display the QGIS Map theme by default + - Option to change from one map theme to another one + - Improvements in the geolocation feature + - Angle measurement tool + - Display mouse position in QGIS project's projection + - Edit mouse position coordinates to center map to given ones +- Selection tool + - Select on multiple layers or a single one + - Invert selection +- Edition tool + - Use QGIS expression in Lizmap edition (needs Lizmap plugin installed as a QGIS Server plugin) + - Group visibility + - Default value + - Constraint + - Form drilldown using Value Relation widget + - Split tool + - Enhanced selection + - Snapping while editing + - Display angle, current and total segment length + - Geolocation survey show GPS accuracy, emitting bip +- Dataviz tool + - Add new sunburst chart type + - Add new graph type HTML + - Add internal theme support, between dark (default) and light + - New options horizontal, display legend, stacked, description + - Hide/show plot when source layer visibility changes + - Support multiple traces & remove limit of 2 Y fields for Scatter & HTML + - Localization + - Check if layer is in scale range to toggle the corresponding map layer + - Add new user layout option && replace resizePlot by responsive cfg && UI improvements + - Add mode bar: zoom in, out & export to PNG + - Add the resizePlot function back +- Attribute Table view + - A Lizmap Javascript script to show description labels instead of values in + the attribute table for columns with ValueMap widget + - Allow the use of the Lizmap Javascript script also for numeric columns +- Timemanager tool + - Review the configuration +- Search tool + - French BAN Search - Add lon and lat parameters to prefer local search around map initial extent center +- Access rights + - Send user info to QGIS Server through parameters to get access control + performed by Lizmap plugin as a QGIS Server plugin + - Restrict filter by user on edition only, based on lizmap plugin config +- Administration + - Project management and Lizmap configuration are now into separate pages +- Command line tool + - A command line to request project WMS GetCapabilities to put project in QGIS Server cache +- Other + - Support of user packages into `lizmap/my-packages/`. A user can install + additional PHP packages like vendor modules for Lizmap, into the `my-packages/` + directory. He should create a `my-packages/composer.json`. + - Lizmap does not support anymore Internet Explorer (11 and lower) + - Map themes - check layer legend checkbox even if not in scale range + - Expose QGIS themes in Lizmap JSON config + +### New JS events + +- `lizmapeditionfeatureinit` to customize edition layers +- `mapthemechanged` and `mapthemesadded` +- `lizmapchangelayervisibility` when map layer visibility changes + +### New PHP events: + +- None + +### Under the hood: + +- Configuration: remove the support of `proxyMethod`. Lizmap now guesses automatically + if it can use curl to do HTTP queries. +- Starting to use some OpenLayers 6 features +- Starting to migrate the javascript code base to modern syntax and organization: + - web components + - webpack etc + - A sourcemap has been added too. +- Upgrade jQuery to 3.5.1 with jQuery-migrate +- Use PHP Composer to import external PHP libraries (jcommunity module, Proj4Php, ...) +- Locales files are moved to `lizmap/app/locales/` +- Tests environment with Docker (Vagrant is still there) +- More unit tests in PHP and Javascript +- Deprecated class lizmapCache removed +- Optimizations to speed up launch + +### Bugfix + +- Read the version changelog diff --git a/CHANGELOG-3.5.md b/CHANGELOG-3.5.md new file mode 100644 index 0000000000..f30ac20ee2 --- /dev/null +++ b/CHANGELOG-3.5.md @@ -0,0 +1,488 @@ +# Changelog Lizmap 3.5 + + + +## Unreleased + +## 3.5.16 - 2023-10-11 + +### Fixed + +* Fix cascade layer's filter to use the parent WMS name instead of the layer name + +## 3.5.15 - 2023-10-03 + +### Fixed + +* Improve the display on mobile about the menu +* Improve logs displayed in the administration panel +* Fix loading of the editing form having a nullable checkbox +* Fix address search when results of the query to api-adresse.data.gouv.fr are empty +* Fix popup when opened from a Lizmap Atlas when the layer has a shortname +* Fix some issues about editing capabilities +* Improve the polygon filtering to get the computed polygon from the cache +* When the layer has an accent : + * Fix the export of the layer + * Fix filtered features disappear from map +* Fix some grammar +* Fix PHP notice about CRS variable + +### Translations + +* Update translated strings from the Transifex website : + * [Lizmap Web Client](https://www.transifex.com/3liz-1/lizmap-locales/dashboard/) + * [Jelix](https://www.transifex.com/3liz-1/jelix/dashboard/) + +## 3.5.14 - 2023-07-31 + +### Important + +* Minimum [Lizmap server plugin](https://github.com/3liz/qgis-lizmap-server-plugin) needed 2.8.0 +* Minimum QGIS server needed 3.10 + +### Fixed + +* Fix a visibility error for a QGIS preset/theme +* Warning about "qgsmtime" for an embedded layer +* Avoid a division by 0 when the scale was set to 0 + +### Translations + +* Update translated strings from the Transifex website : + * [Lizmap Web Client](https://www.transifex.com/3liz-1/lizmap-locales/dashboard/) + * [Jelix](https://www.transifex.com/3liz-1/jelix/dashboard/) + +### Backend + +* Fix some PHP notice when running PHP 8, contribution from @Antoviscomi +* Upgrade Jelix to the latest version 1.6 and jCommunity to 1.3.20 + +### Funders + +* Geolab.re + +## 3.5.13 - 2023-05-30 + +### Important + +* Minimum [Lizmap server plugin](https://github.com/3liz/qgis-lizmap-server-plugin) needed 2.7.1 +* Minimum QGIS server needed 3.10 + +### Added + +* Quick help to open an online color picker +* Add a reminder to check the QGIS server URL +* Add **uuid** in forms for relational values + +### Fixed + +* If the layer has a shortname : + * fix the PDF print request + * the user does a selection +* The `EXP_FILTER` URL parameter was not built for cascade and pivot layers +* Data filtering was broken on children layers +* Plots have to be refreshed when a filter is applied on the parent layer + +## 3.5.12 - 2023-04-12 + +### Important + +* Minimum [Lizmap server plugin](https://github.com/3liz/qgis-lizmap-server-plugin) needed 2.7.0 +* Minimum QGIS server needed 3.10 + +### Fixed + +* Add a check for requesting a QGIS server WMS GetFeatureInfo whe the layer name was not the same as in the filter +* Display the reverse geometry button only for linestrings and polygons, not for points +* UX - Transform `_` and `-` to a space when creating a repository +* Fix issue for retrieving a CSS file +* Fix a possible crash from OpenLayers 7 map when the map was dragged and released +* Remove a warning from Spatialite in the logs, which was not supported for a long time in the QGIS plugin + +### Translations + +* Update translated strings from the Transifex website : + * [Lizmap Web Client](https://www.transifex.com/3liz-1/lizmap-locales/dashboard/) + * [Jelix](https://www.transifex.com/3liz-1/jelix/dashboard/) + +## 3.5.11 - 2023-02-28 + +### Important + +* Minimum [Lizmap server plugin](https://github.com/3liz/qgis-lizmap-server-plugin) needed 1.3.1 +* Minimum QGIS server needed 3.10 + +### Added + +* Improve the wizard for the repository creation : + * Better form with auto-completion + * Some rights are now already checked by default when creating a new repository + +### Fixed + +* In a QGIS project, the primary key defined by QGIS desktop for a Postgres layer may not be a field. +* In a WFS request, no PostGIS features were returned if SRSNAME was different from the layer SRID +* When you click on the zoom to feature button, from the popup, the zoom/pan could be broken +* When you try to select features by point, no selection were performed +* Improve the error message when QGIS server and the Lizmap QGIS server plugin are not installed correctly + +### Backend + +* Update the way to check the validity about : + * a geometry in a Well Known Text format + * a proj4 string in tests + +### Translations + +* Update translated strings from the Transifex website : + * [Lizmap Web Client](https://www.transifex.com/3liz-1/lizmap-locales/dashboard/) + * [Jelix](https://www.transifex.com/3liz-1/jelix/dashboard/) + +### Tests + +* Add more tests about End2End integration to avoid regressions + +## 3.5.10 - 2023-01-25 + +### Fixed + +* Fix a bug about a hidden checkbox in a form +* Add XML header in the GetCapabilities request to avoid a message in the web browser console +* Fix an error during the upgrade + +### Backend + +* Update the minimum Lizmap server plugin to version 1.3.0 + +### Translations + +* Update translated strings from the Transifex website + +## 3.5.9 - 2023-01-23 + +### Changed + +* Improve the user experience when creating a new repository in the administration interface + +### Fixed + +* Projects page: display projects title and buttons at bottom whatever the thumbnail's image size is +* Improve performance in the dataviz panel to avoid too many requests to the server +* Change some CSS about the digitizing toolbar +* No PostGIS features were returned if the map projection was different from the layer projection + +### Backend + +* Upgrade Jelix to version 1.6.39 to avoid an exception during installation + +### Translations + +* Update translated strings from the Transifex website + +## 3.5.8 - 2022-12-08 + +### Fixed + +* Editing - Fix the HTML form widget must use a WYSIWYG editor +* IP into the logs was not the real IP when a reverse proxy was used +* Fix an issue when reading a QGIS project with different capitalization in some values in the QGS files : + `allownull` in the **RelationReference** widget for instance +* Scales displayed according to the base layer which is used, ticket https://github.com/3liz/lizmap-web-client/issues/2978 +* Fix loading of projects having a space or several dot in their filename +* Docker: the `var/themes` content was lost when mounting a volume on this directory +* Docker: some PHP extensions (PDO) were missing +* Fix some GetFeatureInfo requests when it is in parent popup +* Dataviz - Fix wrong display for the horizontal bar charts +* Overview has to use projection and not QGIS Project projection + +### Backend + +* Upgrade Jelix, improve configuration of SMTP with no TLS +* Fix some issues when deployed with Docker + +### Tests + +* Upgrade Cypress to 4.2.0 + +## 3.5.7 - 2022-10-18 + +### Fixed + +* Fix wrong host URL when the WMS is used in another GIS client such as QGIS +* Fix extent synchro between OL2 and OL6 which could cause the center of the map to wrongly move when zooming with mouse +* Update datatables to 1.12.1. This fixes the bad display of sort images in Firefox + +### Tests + +* Improve some automatic testing with Cypress + +### Translations + +* Update from Transifex about translated strings + +## 3.5.6 - 2022-09-20 + +### Added + +* New configuration to set up the Content Security Policy header + +### Fixed + +* Better management of paths for Lizmap repositories +* Form filter - Use OR between the uniques values of the same field +* Fix some requests to QGIS Server +* Fix some minor issues when reading the JSON file about editing capabilities +* Improve the settings about the mail server +* Improve the error message when the Lizmap server plugin is not found +* Fix button to toggle compact/explode table view in popups. Also each button only toggle its own children popup group +* Fixed PHP syntax error in the dataviz module, contribution from @RobiFag +* Fix one issue with PHP8 + +### Translations + +* Update from Transifex about translated strings + +### Backend + +* Update Jelix to version 1.6.38 +* Update OpenLayers to 6.15.1 + +### Tests + +* Add more tests about Cypress + +## 3.5.5 - 2022-07-21 + +### Fixed + +* fix some issues into the Docker image of lizmap +* fixed the SQL query produced from the form filtering + +## 3.5.4 - 2022-07-01 + +### Added + +* New `-dry-run` for the cache generation to see how many tiles might be generated + +### Changed + +* Improve the table in the right's management panel when having a dozen of groups +* Minify legacy JS files to save 400Ko in best case. This reduces first page load +* Add tolerance for clicking on mobile to get the popup +* Do not build the attribute table when refreshing attribute table + +### Fixed + +* Fix the download of files (layer export, PDF) depending on the web-browser (and its version) +* Selected theme can be selected again without selecting another one before +* The style was not updated when the layer has a shortname and was included in a QGIS theme +* CLI tool about cache : fix an issue about the `-bbox` parameter out of the tile matrix limit +* Provide the dataviz button in the left menu only there is at least one non filtered dataviz +* Children popups were not displayed when layer had shortname +* Javascript error when clicking on an atlas link when no feature ID was found +* Fix infinite HTTP loop when the user hasn't any access to the default project +* Fix the attribute table order defined in QGIS desktop +* Fix the "zoom to layer" button when the layer is in EPSG:4326 (Funded by Geocobet) +* When a layer has a shortname, fix one issue about dataviz & relations and fix the children popup wasn't displayed +* Dataviz & relations - Fix possible bug when layer has a shortname + +### Backend + +* Update Jelix to version 1.6.38-pre +* Update PHP CS Fixer to 3.8.0 +* Update the code to support PHP 8.1 + +### Translations + +* Update from Transifex about translated strings + +### Tests + +* Update end-to-end Cypress tests about continuous integration +* Use the new command line `docker compose` + +## 3.5.3 - 2022-04-29 + +### Changed + +* Restore the previous behavior from Lizmap 3.4 about the overview map + Use the new parameter in the Lizmap QGIS plugin to have a dynamic scale + +### Fixed + +* Allow a project thumbnail with capital letters in the extension +* Open a PDF in a new tab when possible on Firefox instead of the internal viewer +* Fix about dataviz panel : plot order and custom plot layout, contribution from @tethysgeco +* Fix some exports issues when there is a selection +* Fix an issue about editing capabilities when using a geometry involved in a QGIS expression +* Fix about some WFS requests about vector data +* Fix about QGIS 3.22 when a group has a shortname +* Fix about QGIS 3.22 with the "Show feature count" +* Fix about geometries in WKT when it's multipart +* Fix the `lizmap_search` feature + +### Translations + +* Update from Transifex about translated strings + +### Backend + +* Upgrade our coding standards by fixing a lot of warnings from PHPStan +* Update of Jelix 1.6 + +### Tests + +* Improve the testing infrastructure +* Upgrade to Cypress 9.5.3 +* Upgrade PHPStan + +## 3.5.2 - 2022-03-24 + +### Fixed + +- Improve the image dialog upload size on tiny screens +- Review the error message about the HTTP code from QGIS Server +- Fix editing feature having an ID equal to 0 +- Fix when an attribute name is starting with a capital name +- Do not show custom labels when printing from a popup about `lizmap_user` and `lizmap_user_groups` +- Fix: HTTP Status Messages for lizmap service responses +- Check version attribute in WxS request in XML to return error +- Fix: GetProj4 request to get proj4 CRS definition from QGIS project +- Speed up GetProjectConfig request by using cache for QGIS Server plugins data +- Fix typo in English sentences +- Do not send private user group to QGIS Server for access control +- Fix regression in form - empty value is added to required menu list field +- Check Version parameters in WxS request to return error +- Fix the GetProjectConfig mime-type as application/json + +### Added + +- New method in `AppContext` to get user public groups ID +- Convert QGis XML Option value based on type attribute +- Add a revision parameter on assets url for cache + +### Backend + +- Upgrade jelix to 1.6.36 + +### Tests + +- e2e: Add Lizmap Service requests tests +- e2e: Update Cypress to 9.5.0 + +## 3.5.1 - 2022-02-08 + +### Added + +- Add new Ukrainian and Romanian languages +- A new panel in the administration interface can display QGIS Server information such version and plugins. + - This information can be retrieved as well in the QGIS Desktop plugin if the administrator login is provided + +### Fixed + +- Fix the value relation widget with multiple text values on feature modification +- Fix a regression in the ValueMap widget config parsing +- Fix the link of selected features between a parent and a child in the attribute table +- Fix a warning into QgisProject with expanded-group-node +- Update IGN URL searching address, the old one will no longer be usable as of February 1, 2022 +- Fix snapping missing when editing existing feature +- Fix geom can be created on existing feature without geometry +- Fix some account management issues with some other authentication modules +- Fix the backup script about third-party modules such as MapBuilder and AltiProfil +- Fix a regression during the init of relation references into forms +- Fix a regression during the loading of embedded projects +- Fix editing when a geom can be created on an existing feature without a geometry on update only +- Fix wrong file storage path for images with the `media` folder +- Fix the landing page using modern CSS - Remove JS resizing project thumbnails and use CSS Grid +- Fix the mime type for SVG files. It should be `image/svg+xml` +- Fix the layer export when : + - a selection or a filter is active + - the layer is not spatial + - the layer has parenthesis inside its name +- Update Lizmap locales + +## 3.5.0 - 2021-12-15 + +### Added + +- User experience + - Reverse geometry button: when editing a line or polygon feature, you can reverse vertices order. + - Display message when a PDF print starts +- Translation + - Add Romanian localization PlotLy file for the dataviz panel (contribution from @ygorigor) +- Data provider + - Allow PostgreSQL geography type (contribution from @flobz) + - Allow to use the new Lizmap "form" from the QGIS Desktop plugin +- Javascript + - Allow use of JS modules (ES6) with docks, by indicating the `type` attribute of ` - - - -
- {@title.webmaster@} -

{@description.webmaster@}

- - - - - - - - - -
*
*
- - -
- -
- {@title.server@} - -
- - -
- - - - - - - - - -
\ No newline at end of file diff --git a/lib/installwizard/pages/dbprofile/dbprofile.en.php b/lib/installwizard/pages/dbprofile/dbprofile.en.php deleted file mode 100644 index 28656613e9..0000000000 --- a/lib/installwizard/pages/dbprofile/dbprofile.en.php +++ /dev/null @@ -1,35 +0,0 @@ -'Database Access Configuration', - - 'title.profile'=>'Profile', - 'label.driver'=>'Database type', - 'label.database'=>'Database name', - 'label.host'=>'Host', - 'label.port'=>'Port', - 'label.user'=>'User', - 'label.password'=>'Password', - 'label.password.confirm'=>'Confirm the password', - 'label.persistent'=>'Persistent connection', - 'label.prefix'=>'Prefix for tables', - 'label.search_path'=>'Search path', - 'label.use.pdo'=>'Use pdo', - 'label.force_encoding'=>'Force the encoding', - 'help.force_encoding'=>'If you don\'t know what is this parameter, check it.', - - 'error.missing.database'=>'The database name is required', - 'error.missing.host'=>'Host is required', - 'error.missing.user'=>'User is required', - 'error.missing.password'=>'Password is required', - 'error.invalid.confirm.password'=>'Confirmation password is not equal to the password', - 'error.no.connection'=>'Cannot connect to the database. Perhaps your parameters are wrong, or perhaps the server is not up.', - 'error.no.database'=>'The server doesn\'t have the given database', - - 'error.extension.mssql.not.installed'=>'MSSql extension is not installed into php', - 'error.extension.mysql.not.installed'=>'Mysql extension is not installed into php', - 'error.extension.pgsql.not.installed'=>'Postgresql extension is not installed into php', - 'error.extension.sqlite.not.installed'=>'sqlite extension is not installed into php', - 'error.extension.oci.not.installed'=>'Oci extension is not installed into php', -); diff --git a/lib/installwizard/pages/dbprofile/dbprofile.fr.php b/lib/installwizard/pages/dbprofile/dbprofile.fr.php deleted file mode 100644 index 52cba337ce..0000000000 --- a/lib/installwizard/pages/dbprofile/dbprofile.fr.php +++ /dev/null @@ -1,35 +0,0 @@ -'Configuration de la base de données', - - 'title.profile'=>'Profil', - 'label.driver'=>'Type de base de données', - 'label.database'=>'Nom de la base', - 'label.host'=>'Serveur', - 'label.port'=>'Port', - 'label.user'=>'Identifiant', - 'label.password'=>'Mot de passe', - 'label.password.confirm'=>'Confirmez le mot de passe', - 'label.persistent'=>'Connexions persistantes', - 'label.prefix'=>'Prefix pour les tables', - 'label.search_path'=>'Search path', - 'label.use.pdo'=>'Utiliser pdo', - 'label.force_encoding'=>'Forcer l\'encodage à la connexion', - 'help.force_encoding'=>'Si vous ne savez pas ce que cela veut dire, cochez la case.', - - 'error.missing.database'=>'Le nom de la base de données est requis', - 'error.missing.host'=>'Le serveur est requis', - 'error.missing.user'=>'L\'identifiant est requis', - 'error.missing.password'=>'Le mot de passe est requis', - 'error.invalid.confirm.password'=>'La confirmation du mot de passe est érronée', - 'error.no.connection'=>'L\'application ne peut pas se connecter à la base de données. Il se peut que vos paramètres ne soient pas bons, ou que le serveur soit injoignable', - 'error.no.database'=>'Le serveur n\'a pas la base indiquée', - - 'error.extension.mssql.not.installed'=>'L\'extension PHP MSSql n\'est pas installée', - 'error.extension.mysql.not.installed'=>'L\'extension PHP MySql n\'est pas installée', - 'error.extension.pgsql.not.installed'=>'L\'extension PHP PostgreSQL n\'est pas installée', - 'error.extension.sqlite.not.installed'=>'L\'extension PHP SQLite n\'est pas installée', - 'error.extension.oci.not.installed'=>'L\'extension PHP Oci n\'est pas installée', -); diff --git a/lib/installwizard/pages/dbprofile/dbprofile.page.php b/lib/installwizard/pages/dbprofile/dbprofile.page.php deleted file mode 100644 index 03f4f06e5c..0000000000 --- a/lib/installwizard/pages/dbprofile/dbprofile.page.php +++ /dev/null @@ -1,460 +0,0 @@ -loadProfiles(); - } - - $sections = $_SESSION['dbprofiles']['profiles']; - $data = $_SESSION['dbprofiles']['data']; - - $ignoreProfiles = isset($this->config['ignoreProfiles'])?$this->config['ignoreProfiles']:''; - $ignoreProfiles = preg_split("/ *, */", $ignoreProfiles); - - if (count($ignoreProfiles)) { - $newsections = array(); - foreach($sections as $profile) { - if(!in_array(substr($profile,4), $ignoreProfiles)) - $newsections[] = $profile; - } - $tpl->assign('profiles', $newsections); - $_SESSION['dbprofiles']['profiles'] = $newsections; - } - else { - $tpl->assign('profiles', $sections); - } - - $tpl->assign($data); - - //$preferPDO = isset($this->config['preferpdo'])?$this->config['preferpdo']:false; - - $tpl->assign('drivers', $this->getDriversList()); - - return true; - } - - protected function getDriversList(){ - $driversInfos = jDbParameters::getDriversInfosList(); - - $drivers = isset($this->config['availabledDrivers'])?$this->config['availabledDrivers']:'mysqli,sqlite3,pgsql'; - $list = preg_split("/ *, */",$drivers); - $drivers = array(); - - foreach($driversInfos as $drinfos) { - if (in_array($drinfos[3], $list)) { - $drv = $drinfos[3]; - if (extension_loaded($drinfos[1])) { - $drivers[$drv] = array($drv, $drinfos[0]) ; - } - if (class_exists('PDO') && extension_loaded($drinfos[2])) { - $drivers[$drv.':pdo'] = array($drv.' (PDO)', $drinfos[0]); - } - } - } - return $drivers; - } - - function process() { - - $ini = new jIniFileModifier(jApp::configPath('profiles.ini.php')); - $hasErrors = false; - $_SESSION['dbprofiles']['data'] = $_POST; - - foreach ($_SESSION['dbprofiles']['profiles'] as $profile) { - $errors = array(); - $params = array(); - $driver = $_POST['driver'][$profile]; - $usepdo = false; - if(substr($driver, -4) == ':pdo') { - $ini->setValue('usepdo', true, $profile); - $usepdo = true; - $realdriver = substr($driver, 0, -4); - } - else { - $ini->removeValue('usepdo', $profile); - $realdriver = $driver; - } - $ini->removeValue('dsn', $profile); - - if(isset($_POST['persistent'][$profile]) && $_POST['persistent'][$profile] == 'on') { - $ini->setValue('persistent', true, $profile); - } - else - $ini->removeValue('persistent', $profile); - - if(isset($_POST['force_encoding'][$profile]) && $_POST['force_encoding'][$profile] == 'on') { - $ini->setValue('force_encoding', true, $profile); - } - else - $ini->removeValue('force_encoding', $profile); - - $ini->setValue('table_prefix', $_POST['table_prefix'][$profile], $profile); - - $database = trim($_POST['database'][$profile]); - if ($database == '') { - $errors[] = $this->locales['error.missing.database']; - continue; - } - $params['database'] = $database; - $ini->setValue('database', $database, $profile); - - $params['driver'] = $realdriver; - $ini->setValue('driver', $realdriver, $profile); - if ($_POST['dbtype'][$profile] != 'sqlite') { - - $host = trim($_POST['host'][$profile]); - if ($host == '' && $realdriver != 'pgsql') { - $errors[] = $this->locales['error.missing.host']; - } - else { - $ini->setValue('host', $host, $profile); - $params['host'] = $host; - } - - $port = trim($_POST['port'][$profile]); - if ($port != '') { - $ini->setValue('port', $port, $profile); - $params['port'] = $port; - } - - $user = trim($_POST['user'][$profile]); - if ($user == '') { - $errors[] = $this->locales['error.missing.user']; - } - else { - $ini->setValue('user', $user, $profile); - $params['user'] = $user; - } - - $password = trim($_POST['password'][$profile]); - $passwordRequired = (isset($this->config['passwordRequired']) && $this->config['passwordRequired']); - if ($password == '' && $passwordRequired) { - $errors[] = $this->locales['error.missing.password']; - } - else { - $ini->setValue('password', $password, $profile); - $params['password'] = $password; - } - - if (trim($_POST['passwordconfirm'][$profile]) != $password) { - $errors[] = $this->locales['error.invalid.confirm.password']; - } - - if ($_POST['dbtype'][$profile] == 'pgsql') { - $search_path = trim($_POST['search_path'][$profile]); - $params['search_path'] = $search_path; - if ($search_path != '') { - $ini->setValue('search_path', $search_path, $profile); - } - } - } - - if (!count($errors)) { - $options = $ini->getValues($profile); - $dbparam = new jDbParameters($options); - $options = $dbparam->getParameters(); - try { - if ($usepdo) { - $m = 'check_PDO'; - } - else { - $m = 'check_'.$options['driver']; - } - $this->$m($options); - } - catch (Exception $e) { - $errors[] = $e->getMessage(); - } - } - - if (count($errors)) - $hasErrors = true; - - $_SESSION['dbprofiles']['data']['errors'][$profile] = $errors; - } - - if ($hasErrors) - return false; - - $ini->save(); - unset($_SESSION['dbprofiles']); - return 0; - } - - protected function loadProfiles () { - $file = jApp::configPath('profiles.ini.php'); - - if (file_exists($file)) { - - } - elseif (file_exists(jApp::configPath('profiles.ini.php.dist'))) { - copy(jApp::configPath('profiles.ini.php.dist'), $file); - } - else { - file_put_contents($file, "; -;for security reasons, don't remove or modify the first line - -[jdb:default] -driver=mysqli -database= -host=localhost -user= -password= -persistent = on -force_encoding = on -table_prefix= -"); - } - - $ini = new jIniFileModifier($file); - - $data = array( - 'dbtype'=>array(), - 'driver'=>array(), - 'database'=>array(), - 'host'=>array(), - 'port'=>array(), - 'user'=>array(), - 'password'=>array(), - 'passwordconfirm'=>array(), - 'persistent'=>array(), - 'table_prefix'=>array(), - 'force_encoding'=>array(), - 'search_path'=>array(), - 'errors'=>array() - ); - - $profiles = $ini->getSectionList(); - $dbprofileslist = array(); - foreach($profiles as $profile) { - if (strpos($profile,'jdb:') !== 0) - continue; - $dbprofileslist[] = $profile; - $options = $ini->getValues($profile); - $dbparam = new jDbParameters($options); - $options = $dbparam->getParameters(); - - $data['dbtype'][$profile] = $options['dbtype']; - $driver =$options['driver']; - if ($options['usepdo']) { - $dsn = $ini->getValue('dsn', $profile); - $data['driver'][$profile] = $driver.':pdo'; - if (preg_match("/host=([^;]*)(;|$)/", $dsn, $m)) { - $data['host'][$profile] = $m[1]; - } - else { - $host = $ini->getValue('host', $profile); - $data['host'][$profile] = ($host===null?'':$host); - } - if (preg_match("/dbname=([^;]*)(;|$)/", $dsn, $m)) { - $data['database'][$profile] = $m[1]; - } - else { - $host = $ini->getValue('database', $profile); - $data['database'][$profile] = ($host===null?'':$host); - } - if (preg_match("/port=([^;]*)(;|$)/", $dsn, $m)) { - $data['port'][$profile] = $m[1]; - } - else { - $port = $ini->getValue('port', $profile); - $data['port'][$profile] = ($port===null?'':$port); - } - } - else { - $data['driver'][$profile] = $driver.($options['usepdo']?':pdo':''); - $data['database'][$profile] = $ini->getValue('database', $profile); - $data['host'][$profile] = $ini->getValue('host', $profile); - $data['port'][$profile] = $ini->getValue('port', $profile); - } - - $data['user'][$profile] = $ini->getValue('user', $profile); - $data['password'][$profile] = $ini->getValue('password', $profile); - $data['passwordconfirm'][$profile] = $data['password'][$profile]; - $data['persistent'][$profile] = $options['persistent']; - $data['force_encoding'][$profile]= $options['force_encoding']; - - $data['table_prefix'][$profile] = $ini->getValue('table_prefix', $profile); - $data['search_path'][$profile] = $ini->getValue('search_path', $profile); - $data['errors'][$profile] = array(); - } - - $_SESSION['dbprofiles']['profiles'] = $dbprofileslist; - $_SESSION['dbprofiles']['data'] = $data; - } - - protected function check_mssql($params) { - if(!function_exists('mssql_connect')) { - throw new Exception($this->locales['error.extension.mssql.not.installed']); - } - $host = $params['host']; - if(isset($params['port']) && $params['port']) { - if(DIRECTORY_SEPARATOR === '\\') - $host.=','.$params['port']; - else - $host.=':'.$params['port']; - } - if ($cnx = @mssql_connect ($host, $params['user'], $params['password'])) { - if(!mssql_select_db ($params['database'], $cnx)) - throw new Exception($this->locales['error.no.database']); - mssql_close($cnx); - } - else { - throw new Exception($this->locales['error.no.connection']); - } - return true; - } - - protected function check_mysql($params) { - if(!function_exists('mysql_connect')) { - throw new Exception($this->locales['error.extension.mysql.not.installed']); - } - $host = $params['host']; - if(isset($params['port']) && $params['port']) { - $host.=':'.$params['port']; - } - if ($cnx = @mysql_connect ($host, $params['user'], $params['password'])) { - if(!mysql_select_db ($params['database'], $cnx)) - throw new Exception($this->locales['error.no.database']); - mysql_close($cnx); - } - else { - throw new Exception($this->locales['error.no.connection']); - } - return true; - } - - protected function check_mysqli($params) { - $host = ($params['persistent']) ? 'p:'.$params['host'] : $params['host']; - $cnx = @new mysqli ($host, $params['user'], $params['password'], $params['database']); - if ($cnx->connect_errno) { - throw new Exception($this->locales['error.no.connection']); - } - $cnx->close(); - return true; - } - - protected function check_oci($params) { - throw new Exception('oci not supported'); - } - - protected function check_pgsql($params) { - if(!function_exists('pg_connect')) { - throw new Exception($this->locales['error.extension.pgsql.not.installed']); - } - - $str = ''; - - // we do a distinction because if the host is given == TCP/IP connection else unix socket - if($params['host'] != '') { - $str = 'host=\''.$params['host'].'\''.$str; - if (isset($params['port']) && $params['port']) { - $str .= ' port=\''.$params['port'].'\''; - } - } - - if ($params['database'] != '') { - $str .= ' dbname=\''.$params['database'].'\''; - } - - // we do isset instead of equality test against an empty string, to allow to specify - // that we want to use configuration set in environment variables - if (isset($params['user'])) { - $str .= ' user=\''.$params['user'].'\''; - } - - if (isset($params['password'])) { - $str .= ' password=\''.$params['password'].'\''; - } - - if (isset($params['timeout']) && $params['timeout'] != '') { - $str .= ' connect_timeout=\''.$params['timeout'].'\''; - } - - if ($cnx = @pg_connect ($str)) { - pg_close($cnx); - } - else { - throw new Exception($this->locales['error.no.connection']); - } - return true; - } - - protected function check_sqlite($params) { - if(!function_exists('sqlite_open')) { - throw new Exception($this->locales['error.extension.sqlite.not.installed']); - } - if ($cnx = @sqlite_open (jApp::varPath('db/sqlite/'.$params['database']))) { - sqlite_close($cnx); - } - else { - throw new Exception($this->locales['error.no.connection']); - } - return true; - } - - protected function check_sqlite3($params) { - $db = $params['database']; - if ($db[0] == '/') { - $path = $db; - } - else if (preg_match('/^(app|lib|var)\:/', $db)) { - $path = jFile::parseJelixPath( $db ); - } - else { - $path = jApp::varPath('db/sqlite3/'.$db); - } - - try { - $sqlite = new SQLite3($path, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); - $sqlite->close(); - } - catch(Exception $e) { - throw new Exception($this->locales['error.no.connection']); - } - return true; - } - - protected function check_PDO($params) { - if ($params['dbtype'] == 'sqlite') { - $user = ''; - $password = ''; - } - else { - if (isset($params['port']) && $params['port']) - $dsn.= ';port='.$params['port']; - $user = $params['user']; - $password = $params['password']; - } - - $pdo = new PDO($params['dsn'], $user, $password, $params['pdooptions']); - $pdo = null; - } - -} diff --git a/lib/installwizard/pages/dbprofile/dbprofile.tpl b/lib/installwizard/pages/dbprofile/dbprofile.tpl deleted file mode 100644 index 8f6bb99715..0000000000 --- a/lib/installwizard/pages/dbprofile/dbprofile.tpl +++ /dev/null @@ -1,94 +0,0 @@ - - - -{foreach $profiles as $profile} - -

{@title.profile@}: {$profile}

-{if count($errors[$profile])} -
    - {foreach $errors[$profile] as $err}
  • {$err|eschtml}
  • {/foreach} -
-{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{@help.force_encoding@}
-{/foreach} diff --git a/lib/installwizard/pages/end/end.en.php b/lib/installwizard/pages/end/end.en.php deleted file mode 100644 index 2673013af7..0000000000 --- a/lib/installwizard/pages/end/end.en.php +++ /dev/null @@ -1,8 +0,0 @@ -'End', - 'finish'=>'The installation is finished', - -); diff --git a/lib/installwizard/pages/end/end.fr.php b/lib/installwizard/pages/end/end.fr.php deleted file mode 100644 index 9ef1c59ee5..0000000000 --- a/lib/installwizard/pages/end/end.fr.php +++ /dev/null @@ -1,8 +0,0 @@ -'Fin', - 'finish'=>'L\'installation est terminée', - -); diff --git a/lib/installwizard/pages/end/end.page.php b/lib/installwizard/pages/end/end.page.php deleted file mode 100644 index 3742982001..0000000000 --- a/lib/installwizard/pages/end/end.page.php +++ /dev/null @@ -1,31 +0,0 @@ -{@finish@}

\ No newline at end of file diff --git a/lib/installwizard/pages/installapp/installapp.en.php b/lib/installwizard/pages/installapp/installapp.en.php deleted file mode 100644 index 59813d3d9a..0000000000 --- a/lib/installwizard/pages/installapp/installapp.en.php +++ /dev/null @@ -1,13 +0,0 @@ -'Application installation', - - 'install.start'=>'Installation starts..', - 'install.end'=>'End', - - 'installation.ok'=>'The installation is a success', - 'installation.cancelled'=>'The installation has failed. Fix the errors and reload this page.', - -); diff --git a/lib/installwizard/pages/installapp/installapp.fr.php b/lib/installwizard/pages/installapp/installapp.fr.php deleted file mode 100644 index efd406d8bc..0000000000 --- a/lib/installwizard/pages/installapp/installapp.fr.php +++ /dev/null @@ -1,13 +0,0 @@ -'Installation de l\'application', - - 'install.start'=>'Démarrage de l\'installation..', - 'install.end'=>'Fin', - - 'installation.ok'=>'L\'installation est un succès', - 'installation.cancelled'=>'L\'installation a échoué. Corrigez les erreurs et rechargez cette page.', - -); diff --git a/lib/installwizard/pages/installapp/installapp.page.php b/lib/installwizard/pages/installapp/installapp.page.php deleted file mode 100644 index dd57a73444..0000000000 --- a/lib/installwizard/pages/installapp/installapp.page.php +++ /dev/null @@ -1,90 +0,0 @@ -config['level'])) { - $level = $this->config['level']; - if (!in_array($level, array('error', 'notice', 'warning'))) - $level = 'warning'; - } - else - $level = 'warning'; - - - $reporter = new wizInstallReporter($level, $this); - $installer = new jInstaller($reporter); - $ok = $installer->installApplication(); - - $tpl->assign('messages', $reporter->messages); - $tpl->assign('installok', $ok); - - return $ok; - } - - /** - * action to process the page after the submit - */ - function process() { - return 0; - } -} - - /** - * - */ -class wizInstallReporter implements jIInstallReporter { - /** - * @var string error, notice or warning - */ - protected $level; - - public $messages = array(); - - function __construct($level= 'notice', $page) { - $this->level = $level; - $this->page = $page; - } - - function start() { - if ($this->level == 'notice') - $this->messages[] = array('notice', $this->page->getLocale('install.start')); - } - - /** - * displays a message - * @param string $message the message to display - * @param string $type the type of the message : 'error', 'notice', 'warning', '' - */ - function message($message, $type='') { - if (($type == 'error' && $this->level != '') - || ($type == 'warning' && $this->level != 'notice' && $this->level != '') - || (($type == 'notice' || $type =='') && $this->level == 'notice')) - $this->messages[] = array( $type, $message); - } - - /** - * called when the installation is finished - * @param array $results an array which contains, for each type of message, - * the number of messages - */ - function end($results) { - $this->messages[] = array('', $this->page->getLocale('install.end')); - } -} \ No newline at end of file diff --git a/lib/installwizard/pages/installapp/installapp.tpl b/lib/installwizard/pages/installapp/installapp.tpl deleted file mode 100644 index d40a384efa..0000000000 --- a/lib/installwizard/pages/installapp/installapp.tpl +++ /dev/null @@ -1,12 +0,0 @@ - -
    - {foreach $messages as $msg} -
  • {$msg[1]}
  • - {/foreach} -
- -{if $installok} -

{@installation.ok@}

-{else} -

{@installation.cancelled@}

-{/if} \ No newline at end of file diff --git a/lib/installwizard/pages/welcome/welcome.en.php b/lib/installwizard/pages/welcome/welcome.en.php deleted file mode 100644 index a89364898f..0000000000 --- a/lib/installwizard/pages/welcome/welcome.en.php +++ /dev/null @@ -1,8 +0,0 @@ -'Welcome', - 'instruction'=>'Click on the "next" button to start the installation of the application', - -); diff --git a/lib/installwizard/pages/welcome/welcome.fr.php b/lib/installwizard/pages/welcome/welcome.fr.php deleted file mode 100644 index 79f6c22f19..0000000000 --- a/lib/installwizard/pages/welcome/welcome.fr.php +++ /dev/null @@ -1,8 +0,0 @@ -'Bienvenue', - 'instruction'=>'Cliquez sur le bouton "suivant" pour démarrer l\'installation de l\'application', - -); diff --git a/lib/installwizard/pages/welcome/welcome.page.php b/lib/installwizard/pages/welcome/welcome.page.php deleted file mode 100644 index f1e2155a82..0000000000 --- a/lib/installwizard/pages/welcome/welcome.page.php +++ /dev/null @@ -1,31 +0,0 @@ -{@instruction@} {$appname}

\ No newline at end of file diff --git a/lib/installwizard/wiz_layout.en.php b/lib/installwizard/wiz_layout.en.php deleted file mode 100644 index 587f3d2f1a..0000000000 --- a/lib/installwizard/wiz_layout.en.php +++ /dev/null @@ -1,9 +0,0 @@ -'installation wizard', -'previousLabel' => 'previous', -'nextLabel'=> 'next', - - -); diff --git a/lib/installwizard/wiz_layout.fr.php b/lib/installwizard/wiz_layout.fr.php deleted file mode 100644 index 4fffe3f2f0..0000000000 --- a/lib/installwizard/wiz_layout.fr.php +++ /dev/null @@ -1,9 +0,0 @@ -'Assistant d\'installation', -'previousLabel' => 'Précédent', -'nextLabel'=> 'Suivant', - - -); diff --git a/lib/installwizard/wiz_layout.tpl b/lib/installwizard/wiz_layout.tpl deleted file mode 100644 index bddcb38a9d..0000000000 --- a/lib/installwizard/wiz_layout.tpl +++ /dev/null @@ -1,130 +0,0 @@ - - - - - Installation Wizard - - - - - - -

{$appname}
{@maintitle@}

- -
-
-
- - -
-
-
-

{$title|eschtml}

-
- {if $messageHeader}
{@$messageHeader@|eschtml}
{/if} - {$MAIN} - {if $messageFooter}
{@$messageFooter@|eschtml}
{/if} -
-
-
-
- {if $previous} - - {/if} - {if $next} - - {/if} -
-
-
- - - \ No newline at end of file diff --git a/lib/installwizard/wizard.ini.php.dist b/lib/installwizard/wizard.ini.php.dist deleted file mode 100644 index 85dfccc834..0000000000 --- a/lib/installwizard/wizard.ini.php.dist +++ /dev/null @@ -1,21 +0,0 @@ - -; path related to the ini file. By default, the ini file is expected to be into the myapp/install/ directory. -pagesPath = "../../lib/installwizard/pages/,pages/" -customPath = "custom/" -start = nom page de demarrage -tempPath = "../../temp/myapp/" -supportedLang = en - -[welcome.step] -next=checkjelix -;enctype - -[checkjelix.step] -next=end - -[end.step] -noprevious = on - -[foo.step] -;enctype= -;noprevious = on \ No newline at end of file diff --git a/lib/jelix-admin-modules/CREDITS b/lib/jelix-admin-modules/CREDITS deleted file mode 100644 index bcd8a98664..0000000000 --- a/lib/jelix-admin-modules/CREDITS +++ /dev/null @@ -1,23 +0,0 @@ -Credits -======= - -By alphabetic order on the name - -Laurent Jouanneau - - creator of modules: jacl2db_admin, jauthdb_admin, master_admin - -Cédric Houwaer (hoover (dot) united (at) gmail (dot) com) - - designer of dashboard.png -Kévin Lepeltier - - improvement on the master_admin menu (#811) - - improvement on the master_admin info box (#812) - -Geekbay - - fixed a bug in the master_admin template (#816) - - little improvement in the main.tpl in the master_admin module (#850) - -Baptiste Toinot - - improvement of wording in the master_admin (#855) - - improvement of design on the master_admin menu (#863) - -Thanks to famfamfam.com for the cute icons. (http://www.famfamfam.com/lab/icons/silk/) diff --git a/lib/jelix-admin-modules/jacl2db_admin/classes/jacl2db_admin.listener.php b/lib/jelix-admin-modules/jacl2db_admin/classes/jacl2db_admin.listener.php deleted file mode 100644 index aac02e4c6d..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/classes/jacl2db_admin.listener.php +++ /dev/null @@ -1,28 +0,0 @@ -icon = jApp::config()->urlengine['jelixWWWPath'] . 'design/images/rights.png'; - $event->add($item); - } - if(jAcl2::check('acl.group.view')) { - $item = new masterAdminMenuItem('usersgroups', jLocale::get('jacl2db_admin~acl2.menu.item.groups'), jUrl::get('jacl2db_admin~groups:index'), 20, 'system'); - $item->icon = jApp::config()->urlengine['jelixWWWPath'] . 'design/images/group.png'; - $event->add($item); - } - } -} diff --git a/lib/jelix-admin-modules/jacl2db_admin/controllers/groups.classic.php b/lib/jelix-admin-modules/jacl2db_admin/controllers/groups.classic.php deleted file mode 100644 index ab4ef832b5..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/controllers/groups.classic.php +++ /dev/null @@ -1,287 +0,0 @@ -array('jacl2.right'=>'acl.group.view'), - 'rights'=>array('jacl2.rights.and'=>array('acl.group.view','acl.group.modify')), - 'saverights'=>array('jacl2.rights.and'=>array('acl.group.view','acl.group.modify')), - 'newgroup'=>array('jacl2.rights.and'=>array('acl.group.view','acl.group.create')), - 'changename'=>array('jacl2.rights.and'=>array('acl.group.view','acl.group.modify')), - 'delgroup'=>array('jacl2.rights.and'=>array('acl.group.view','acl.group.delete')), - 'setdefault'=>array('jacl2.rights.and'=>array('acl.group.view','acl.group.modify')), - ); - - protected function getLabel($id, $labelKey) { - if ($labelKey) { - try { - return jLocale::get($labelKey); - } - catch(Exception $e) { } - } - return $id; - } - - protected function loadGroupRights($tpl) { - $gid=array('__anonymous'); - $o = new StdClass; - $o->id_aclgrp = '__anonymous'; - $o->name = jLocale::get('jacl2db_admin~acl2.anonymous.group.name'); - $o->grouptype = 0; - - $daorights = jDao::get('jacl2db~jacl2rights','jacl2_profile'); - $rightsWithResources = array(); - $hasRightsOnResources = false; - - // retrieve the list of groups and the number of existing rights with - // resource for each groups - $groups=array($o); - $grouprights=array('__anonymous'=>false); - foreach(jAcl2DbUserGroup::getGroupList() as $grp) { - $gid[]=$grp->id_aclgrp; - $groups[]=$grp; - $grouprights[$grp->id_aclgrp]=''; - - $rs = $daorights->getRightsHavingRes($grp->id_aclgrp); - foreach($rs as $rec){ - if (!isset($rightsWithResources[$rec->id_aclsbj])) - $rightsWithResources[$rec->id_aclsbj] = array(); - if (!isset($rightsWithResources[$rec->id_aclsbj][$grp->id_aclgrp])) - $rightsWithResources[$rec->id_aclsbj][$grp->id_aclgrp] = 0; - $rightsWithResources[$rec->id_aclsbj][$grp->id_aclgrp] ++; - } - } - - // retrieve the number of existing rights with - // resource for the anonymous group - $rs = $daorights->getRightsHavingRes('__anonymous'); - foreach($rs as $rec){ - if (!isset($rightsWithResources[$rec->id_aclsbj])) - $rightsWithResources[$rec->id_aclsbj] = array(); - if (!isset($rightsWithResources[$rec->id_aclsbj]['__anonymous'])) - $rightsWithResources[$rec->id_aclsbj]['__anonymous'] = 0; - $rightsWithResources[$rec->id_aclsbj]['__anonymous'] ++; - } - - // create the list of subjects and their labels - $rights=array(); - $sbjgroups_localized = array(); - $subjects = array(); - $rs = jDao::get('jacl2db~jacl2subject','jacl2_profile')->findAllSubject(); - foreach($rs as $rec){ - $rights[$rec->id_aclsbj] = $grouprights; - $subjects[$rec->id_aclsbj] = array('grp'=>$rec->id_aclsbjgrp, 'label'=>$this->getLabel($rec->id_aclsbj, $rec->label_key)); - if ($rec->id_aclsbjgrp && !isset($sbjgroups_localized[$rec->id_aclsbjgrp])) { - $sbjgroups_localized[$rec->id_aclsbjgrp] = $this->getLabel($rec->id_aclsbjgrp, $rec->label_group_key); - } - if (!isset($rightsWithResources[$rec->id_aclsbj])) - $rightsWithResources[$rec->id_aclsbj] = array(); - } - - // retrieve existing rights - $rs = jDao::get('jacl2db~jacl2rights','jacl2_profile')->getRightsByGroups($gid); - foreach($rs as $rec){ - $rights[$rec->id_aclsbj][$rec->id_aclgrp] = ($rec->canceled?'n':'y'); - } - - $tpl->assign('nbgrp', count($groups)); - $tpl->assign(compact('groups', 'rights', 'sbjgroups_localized', 'subjects', 'rightsWithResources')); - } - - /** - * - */ - function index() { - $rep = $this->getResponse('html'); - $tpl = new jTpl(); - - if (jAcl2::check('acl.group.modify')) { - $tpl->assign('groups', jAcl2DbUserGroup::getGroupList()->fetchAll()); - $rep->body->assign('MAIN', $tpl->fetch('groups_edit')); - } - else { - $this->loadGroupRights($tpl); - $rep->body->assign('MAIN', $tpl->fetch('groups_right_view')); - } - $rep->body->assign('selectedMenuItem','usersgroups'); - return $rep; - } - - function rights() { - $rep = $this->getResponse('html'); - $tpl = new jTpl(); - - $this->loadGroupRights($tpl); - $rep->body->assign('MAIN', $tpl->fetch('groups_right')); - $rep->body->assign('selectedMenuItem','usersgroups'); - return $rep; - } - - function saverights(){ - $rep = $this->getResponse('redirect'); - $rights = $this->param('rights',array()); - - foreach(jAcl2DbUserGroup::getGroupList() as $grp) { - $id = $grp->id_aclgrp; - jAcl2DbManager::setRightsOnGroup($id, (isset($rights[$id])?$rights[$id]:array())); - } - - jAcl2DbManager::setRightsOnGroup('__anonymous', (isset($rights['__anonymous'])?$rights['__anonymous']:array())); - jMessage::add(jLocale::get('acl2.message.group.rights.ok'), 'ok'); - $rep->action = 'jacl2db_admin~groups:rights'; - return $rep; - } - - function rightres(){ - $rep = $this->getResponse('html'); - - $groupid = $this->param('group', null); - - if ($groupid === null || $groupid == '') { - $rep->body->assign('MAIN', '

invalid group.

'); - return $rep; - } - - $daogroup = jDao::get('jacl2db~jacl2group','jacl2_profile'); - if ($groupid != '__anonymous') { - $group = $daogroup->get($groupid); - if (!$group) { - $rep->body->assign('MAIN', '

invalid group.

'); - return $rep; - } - $groupname = $group->name; - } - else - $groupname = jLocale::get('jacl2db_admin~acl2.anonymous.group.name'); - - $rightsWithResources = array(); - $daorights = jDao::get('jacl2db~jacl2rights','jacl2_profile'); - - $rs = $daorights->getRightsHavingRes($groupid); - $hasRightsOnResources = false; - foreach($rs as $rec){ - if (!isset($rightsWithResources[$rec->id_aclsbj])) - $rightsWithResources[$rec->id_aclsbj] = array(); - $rightsWithResources[$rec->id_aclsbj][] = $rec; - $hasRightsOnResources = true; - } - $subjects_localized = array(); - if(!empty($rightsWithResources)){ - $conditions = jDao::createConditions(); - $conditions->addCondition('id_aclsbj', 'in', array_keys($rightsWithResources)); - foreach(jDao::get('jacl2db~jacl2subject','jacl2_profile')->findBy($conditions) as $rec) - $subjects_localized[$rec->id_aclsbj] = jLocale::get($rec->label_key); - } - $tpl = new jTpl(); - $tpl->assign(compact('groupid', 'groupname', 'subjects_localized', 'rightsWithResources', 'hasRightsOnResources')); - - if(jAcl2::check('acl.group.modify')) { - $rep->body->assign('MAIN', $tpl->fetch('group_rights_res')); - }else{ - $rep->body->assign('MAIN', $tpl->fetch('group_rights_res_view')); - } - $rep->body->assign('selectedMenuItem','usersgroups'); - return $rep; - } - - function saverightres(){ - $rep = $this->getResponse('redirect'); - $rep->action = 'jacl2db_admin~groups:rightres'; - - $subjects = $this->param('subjects',array()); - - $groupid = $this->param('group', null); - if ($groupid === null || $groupid == '') { - $rep->action = 'jacl2db_admin~groups:rights'; - return $rep; - } - - $daogroup = jDao::get('jacl2db~jacl2group', 'jacl2_profile'); - if ($groupid != '__anonymous') { - $group = $daogroup->get($groupid); - if (!$group) { - $rep->action = 'jacl2db_admin~groups:rights'; - return $rep; - } - } - - $rep->params = array('group'=>$groupid); - - $subjectsToRemove = array(); - - foreach($subjects as $sbj=>$val) { - if ($val != '' || $val == true) { - $subjectsToRemove[] = $sbj; - } - } - - jDao::get('jacl2db~jacl2rights', 'jacl2_profile') - ->deleteRightsOnResource($groupid, $subjectsToRemove); - jMessage::add(jLocale::get('jacl2db_admin~acl2.message.group.rights.ok'), 'ok'); - return $rep; - } - - function setdefault(){ - $rep = $this->getResponse('redirect'); - $groups = $this->param('groups',array()); - - foreach(jAcl2DbUserGroup::getGroupList() as $grp) { - $default = in_array($grp->id_aclgrp, $groups); - jAcl2DbUserGroup::setDefaultGroup($grp->id_aclgrp, $default); - } - jMessage::add(jLocale::get('acl2.message.groups.setdefault.ok'), 'ok'); - - $rep->action = 'jacl2db_admin~groups:index'; - return $rep; - } - - function newgroup() { - $rep = $this->getResponse('redirect'); - $rep->action = 'jacl2db_admin~groups:index'; - - $name = $this->param('newgroup'); - $id = $this->param('newgroupid'); - if (trim($id) == '') - $id = null; - if($name != '') { - jAcl2DbUserGroup::createGroup($name, $id); - jMessage::add(jLocale::get('acl2.message.group.create.ok'), 'ok'); - } - return $rep; - } - - function changename() { - $rep = $this->getResponse('redirect'); - $rep->action = 'jacl2db_admin~groups:index'; - - $id = $this->param('group_id'); - $name = $this->param('newname'); - if ($id != '' && $name != '') { - jAcl2DbUserGroup::updateGroup($id, $name); - jMessage::add(jLocale::get('acl2.message.group.rename.ok'), 'ok'); - } - return $rep; - } - - function delgroup() { - $rep = $this->getResponse('redirect'); - $rep->action = 'jacl2db_admin~groups:index'; - - jAcl2DbUserGroup::removeGroup($this->param('group_id')); - jMessage::add(jLocale::get('acl2.message.group.delete.ok'), 'ok'); - - return $rep; - } -} diff --git a/lib/jelix-admin-modules/jacl2db_admin/controllers/users.classic.php b/lib/jelix-admin-modules/jacl2db_admin/controllers/users.classic.php deleted file mode 100644 index e681458e07..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/controllers/users.classic.php +++ /dev/null @@ -1,318 +0,0 @@ -array('jacl2.rights.and'=>array('acl.user.view')), - 'rights'=>array('jacl2.rights.and'=>array('acl.user.view')), - 'saverights'=>array('jacl2.rights.and'=>array('acl.user.view')), - 'removegroup'=>array('jacl2.rights.and'=>array('acl.user.view','acl.user.modify')), - 'addgroup'=>array('jacl2.rights.and'=>array('acl.user.view','acl.user.modify')), - ); - - /** - * - */ - function index() { - $rep = $this->getResponse('html'); - - $groups=array(); - - $o = new StdClass; - $o->id_aclgrp ='-2'; - $o->name=jLocale::get('jacl2db_admin~acl2.all.users.option'); - $o->grouptype=0; - $groups[]=$o; - - $o = new StdClass; - $o->id_aclgrp ='-1'; - $o->name=jLocale::get('jacl2db_admin~acl2.without.groups.option'); - $o->grouptype=0; - $groups[]=$o; - - foreach(jAcl2DbUserGroup::getGroupList() as $grp) { - $groups[]=$grp; - } - - $listPageSize = 15; - $offset = $this->param('idx',0,true); - $grpid = $this->param('grpid',-2,true); - - $p = 'jacl2_profile'; - - if($grpid == -2) { - //all users - $dao = jDao::get('jacl2db~jacl2groupsofuser',$p); - $cond = jDao::createConditions(); - $cond->addCondition('grouptype', '=', 2); - $rs = $dao->findBy($cond,$offset,$listPageSize); - $usersCount = $dao->countBy($cond); - - } elseif($grpid == -1) { - $cnx = jDb::getConnection($p); - //only those who have no groups - if($cnx->dbms != 'pgsql') { - // with MYSQL 4.0.12, you must use an alias with the count to use it with HAVING - $sql = 'SELECT login, count(id_aclgrp) as nbgrp FROM '.$cnx->prefixTable('jacl2_user_group').' - GROUP BY login HAVING nbgrp < 2 ORDER BY login'; - } else { - // But PgSQL doesn't support the HAVING structure with an alias. - $sql = 'SELECT login, count(id_aclgrp) as nbgrp FROM '.$cnx->prefixTable('jacl2_user_group').' - GROUP BY login HAVING count(id_aclgrp) < 2 ORDER BY login'; - } - - $rs = $cnx->query($sql); - $usersCount = $rs->rowCount(); - } else { - //in a specific group - $dao = jDao::get('jacl2db~jacl2usergroup',$p); - $rs = $dao->getUsersGroupLimit($grpid, $offset, $listPageSize); - $usersCount = $dao->getUsersGroupCount($grpid); - } - $users=array(); - $dao2 = jDao::get('jacl2db~jacl2groupsofuser',$p); - foreach($rs as $u){ - $u->groups = array(); - $gl = $dao2->getGroupsUser($u->login); - foreach($gl as $g) { - if($g->grouptype != 2) - $u->groups[]=$g; - } - $users[] = $u; - } - - $tpl = new jTpl(); - $tpl->assign(compact('offset','grpid','listPageSize','groups','users','usersCount')); - $rep->body->assign('MAIN', $tpl->fetch('users_list')); - $rep->body->assign('selectedMenuItem','usersrights'); - - return $rep; - } - - protected function getLabel($id, $labelKey) { - if ($labelKey) { - try { - return jLocale::get($labelKey); - } - catch(Exception $e) { } - } - return $id; - } - - function rights(){ - $rep = $this->getResponse('html'); - - $user = $this->param('user'); - if (!$user) { - $rep->body->assign('MAIN', '

invalid user

'); - return $rep; - } - - // retrieve user - $dao = jDao::get('jacl2db~jacl2groupsofuser','jacl2_profile'); - $cond = jDao::createConditions(); - $cond->addCondition('login', '=', $user); - $cond->addCondition('grouptype', '=', 2); - if ($dao->countBy($cond)==0) { - $rep->body->assign('MAIN', '

invalid user

'); - return $rep; - } - - // retrieve groups of the user - $hisgroup = null; - $groupsuser = array(); - foreach(jAcl2DbUserGroup::getGroupList($user) as $grp) { - if($grp->grouptype == 2) - $hisgroup = $grp; - else - $groupsuser[$grp->id_aclgrp]=$grp; - } - - // retrieve all groups - $gid=array($hisgroup->id_aclgrp); - $groups=array(); - $grouprights=array($hisgroup->id_aclgrp=>false); - foreach(jAcl2DbUserGroup::getGroupList() as $grp) { - $gid[]=$grp->id_aclgrp; - $groups[]=$grp; - $grouprights[$grp->id_aclgrp]=''; - } - - // create the list of subjects and their labels - $rights=array(); - $subjects = array(); - $sbjgroups_localized = array(); - $rs = jDao::get('jacl2db~jacl2subject','jacl2_profile')->findAllSubject(); - foreach($rs as $rec){ - $rights[$rec->id_aclsbj] = $grouprights; - $subjects[$rec->id_aclsbj] = array('grp'=>$rec->id_aclsbjgrp, - 'label'=>$this->getLabel($rec->id_aclsbj, $rec->label_key)); - if ($rec->id_aclsbjgrp && !isset($sbjgroups_localized[$rec->id_aclsbjgrp])) { - $sbjgroups_localized[$rec->id_aclsbjgrp] = $this->getLabel($rec->id_aclsbjgrp, $rec->label_group_key); - } - } - - $rightsWithResources = array_fill_keys(array_keys($rights),0); - $daorights = jDao::get('jacl2db~jacl2rights','jacl2_profile'); - - $rs = $daorights->getRightsHavingRes($hisgroup->id_aclgrp); - $hasRightsOnResources = false; - foreach($rs as $rec){ - $rightsWithResources[$rec->id_aclsbj]++; - $hasRightsOnResources = true; - } - - $rs = $daorights->getRightsByGroups($gid); - foreach($rs as $rec){ - $rights[$rec->id_aclsbj][$rec->id_aclgrp] = ($rec->canceled?'n':'y'); - } - - $tpl = new jTpl(); - $tpl->assign(compact('hisgroup', 'groupsuser', 'groups', 'rights','user', - 'subjects', 'sbjgroups_localized', - 'rightsWithResources', 'hasRightsOnResources')); - $tpl->assign('nbgrp', count($groups)); - - if(jAcl2::check('acl.user.modify')) { - $rep->body->assign('MAIN', $tpl->fetch('user_rights')); - }else{ - $rep->body->assign('MAIN', $tpl->fetch('user_rights_view')); - } - $rep->body->assign('selectedMenuItem','usersrights'); - return $rep; - } - - function saverights(){ - $rep = $this->getResponse('redirect'); - $login = $this->param('user'); - $rights = $this->param('rights',array()); - - if($login == '') { - $rep->action = 'jacl2db_admin~users:index'; - return $rep; - } - - $rep->action = 'jacl2db_admin~users:rights'; - $rep->params=array('user'=>$login); - - $dao = jDao::get('jacl2db~jacl2groupsofuser','jacl2_profile'); - $grp = $dao->getPrivateGroup($login); - - jAcl2DbManager::setRightsOnGroup($grp->id_aclgrp, $rights); - jMessage::add(jLocale::get('acl2.message.user.rights.ok'), 'ok'); - return $rep; - } - - function rightres(){ - $rep = $this->getResponse('html'); - - $user = $this->param('user'); - if (!$user) { - $rep->body->assign('MAIN', '

invalid user

'); - return $rep; - } - - $daogroup = jDao::get('jacl2db~jacl2group','jacl2_profile'); - - $group = $daogroup->getPrivateGroup($user); - - $rightsWithResources = array(); - $daorights = jDao::get('jacl2db~jacl2rights','jacl2_profile'); - - $rs = $daorights->getRightsHavingRes($group->id_aclgrp); - $hasRightsOnResources = false; - foreach($rs as $rec){ - if (!isset($rightsWithResources[$rec->id_aclsbj])) - $rightsWithResources[$rec->id_aclsbj] = array(); - $rightsWithResources[$rec->id_aclsbj][] = $rec; - $hasRightsOnResources = true; - } - $subjects_localized = array(); - if(!empty($rightsWithResources)){ - $conditions = jDao::createConditions(); - $conditions->addCondition('id_aclsbj', 'in', array_keys($rightsWithResources)); - foreach(jDao::get('jacl2db~jacl2subject','jacl2_profile')->findBy($conditions) as $rec) - $subjects_localized[$rec->id_aclsbj] = jLocale::get($rec->label_key); - } - $tpl = new jTpl(); - $tpl->assign(compact('user', 'subjects_localized', 'rightsWithResources', 'hasRightsOnResources')); - - if(jAcl2::check('acl.user.modify')) { - $rep->body->assign('MAIN', $tpl->fetch('user_rights_res')); - }else{ - $rep->body->assign('MAIN', $tpl->fetch('user_rights_res_view')); - } - $rep->body->assign('selectedMenuItem','usersrights'); - return $rep; - } - - function saverightres(){ - $rep = $this->getResponse('redirect'); - $login = $this->param('user'); - $subjects = $this->param('subjects',array()); - - if($login == '') { - $rep->action = 'jacl2db_admin~users:index'; - return $rep; - } - - $rep->action = 'jacl2db_admin~users:rightres'; - $rep->params=array('user'=>$login); - - $daogroup = jDao::get('jacl2db~jacl2group', 'jacl2_profile'); - $grp = $daogroup->getPrivateGroup($login); - - $subjectsToRemove = array(); - - foreach($subjects as $sbj=>$val) { - if ($val != '' || $val == true) { - $subjectsToRemove[] = $sbj; - } - } - - jDao::get('jacl2db~jacl2rights', 'jacl2_profile') - ->deleteRightsOnResource($grp->id_aclgrp, $subjectsToRemove); - jMessage::add(jLocale::get('acl2.message.user.rights.ok'), 'ok'); - return $rep; - } - - function removegroup(){ - $rep = $this->getResponse('redirect'); - - $login = $this->param('user'); - if($login != '') { - $rep->action = 'jacl2db_admin~users:rights'; - $rep->params=array('user'=>$login); - jAcl2DbUserGroup::removeUserFromGroup($login, $this->param('grpid') ); - }else{ - $rep->action = 'jacl2db_admin~users:index'; - } - - return $rep; - } - - function addgroup(){ - $rep = $this->getResponse('redirect'); - - $login = $this->param('user'); - if($login != '') { - $rep->action = 'jacl2db_admin~users:rights'; - $rep->params=array('user'=>$login); - jAcl2DbUserGroup::addUserToGroup($login, $this->param('grpid') ); - }else{ - $rep->action = 'jacl2db_admin~users:index'; - } - return $rep; - } - -} diff --git a/lib/jelix-admin-modules/jacl2db_admin/events.xml b/lib/jelix-admin-modules/jacl2db_admin/events.xml deleted file mode 100644 index 017c678928..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/events.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.ISO-8859-1.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.ISO-8859-1.properties deleted file mode 100644 index 28807af856..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.ISO-8859-1.properties +++ /dev/null @@ -1,68 +0,0 @@ -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - -table.th.groups = Groups -table.th.rights = Rights - -groups.title=Groups of users for rights -rights.title=Rights -groups.rights.title=Rights of groups -groups.change.rights.link=Change rights of groups -groups.new.users.title=Groups of new users -save.button=Save -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -delete.group=Delete a group -delete.button=Delete -setdefault.button=Set default groups -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights - -message.groups.setdefault.ok=Default groups set -message.group.rename.ok=Group renamed -message.group.create.ok=Group created -message.group.delete.ok=Group deleted -message.group.rights.ok=Rights saved -message.user.rights.ok=Rights saved - -user.rights.title=Rights for -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -users.title=Rights of users -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -user.rightres.title=Rights on resources for -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! - -group.rightres.title=Rights on resources for the group -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. - -no.rightres = No special rights - -global.rights = global -special.rights = special diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.ISO-8859-15.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.ISO-8859-15.properties deleted file mode 100644 index 28807af856..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.ISO-8859-15.properties +++ /dev/null @@ -1,68 +0,0 @@ -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - -table.th.groups = Groups -table.th.rights = Rights - -groups.title=Groups of users for rights -rights.title=Rights -groups.rights.title=Rights of groups -groups.change.rights.link=Change rights of groups -groups.new.users.title=Groups of new users -save.button=Save -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -delete.group=Delete a group -delete.button=Delete -setdefault.button=Set default groups -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights - -message.groups.setdefault.ok=Default groups set -message.group.rename.ok=Group renamed -message.group.create.ok=Group created -message.group.delete.ok=Group deleted -message.group.rights.ok=Rights saved -message.user.rights.ok=Rights saved - -user.rights.title=Rights for -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -users.title=Rights of users -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -user.rightres.title=Rights on resources for -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! - -group.rightres.title=Rights on resources for the group -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. - -no.rightres = No special rights - -global.rights = global -special.rights = special diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.UTF-8.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.UTF-8.properties deleted file mode 100644 index 28807af856..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_EN/acl2.UTF-8.properties +++ /dev/null @@ -1,68 +0,0 @@ -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - -table.th.groups = Groups -table.th.rights = Rights - -groups.title=Groups of users for rights -rights.title=Rights -groups.rights.title=Rights of groups -groups.change.rights.link=Change rights of groups -groups.new.users.title=Groups of new users -save.button=Save -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -delete.group=Delete a group -delete.button=Delete -setdefault.button=Set default groups -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights - -message.groups.setdefault.ok=Default groups set -message.group.rename.ok=Group renamed -message.group.create.ok=Group created -message.group.delete.ok=Group deleted -message.group.rights.ok=Rights saved -message.user.rights.ok=Rights saved - -user.rights.title=Rights for -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -users.title=Rights of users -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -user.rightres.title=Rights on resources for -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! - -group.rightres.title=Rights on resources for the group -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. - -no.rightres = No special rights - -global.rights = global -special.rights = special diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.ISO-8859-1.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.ISO-8859-1.properties deleted file mode 100644 index 378c618058..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.ISO-8859-1.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - - -# -- main page "Groups of users for rights" -groups.title=Groups of users for rights - -groups.change.rights.link=Change rights of groups - -# form to indicate on which groups a new user is attached by default -groups.new.users.title=Groups of new users -setdefault.button=Set default groups -message.groups.setdefault.ok=Default groups set - -# form to create a new group -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -message.group.create.ok=Group created - -# form to change the name of a group -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -message.group.rename.ok=Group renamed - -# form to remove a group -delete.group=Delete a group -delete.button=Delete -message.group.delete.ok=Group deleted - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title=Rights of groups - -table.th.groups = Groups -table.th.rights = Rights - -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. -global.rights = global -special.rights = special - - -# -- page to change special rights for groups -message.group.rights.ok=Rights saved -group.rightres.title=Rights on resources for the group - - -# -- page to list users of each groups -users.title=Rights of users - -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -# -- page to set rights of a specific user -user.rights.title=Rights for - -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights -message.user.rights.ok=Rights saved - -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -# -- page to set special rights of a specific user -user.rightres.title=Rights on resources for - - -# -- labels used in several pages -rights.title=Rights -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! -no.rightres = No special rights - -save.button=Save diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.ISO-8859-15.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.ISO-8859-15.properties deleted file mode 100644 index 378c618058..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.ISO-8859-15.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - - -# -- main page "Groups of users for rights" -groups.title=Groups of users for rights - -groups.change.rights.link=Change rights of groups - -# form to indicate on which groups a new user is attached by default -groups.new.users.title=Groups of new users -setdefault.button=Set default groups -message.groups.setdefault.ok=Default groups set - -# form to create a new group -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -message.group.create.ok=Group created - -# form to change the name of a group -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -message.group.rename.ok=Group renamed - -# form to remove a group -delete.group=Delete a group -delete.button=Delete -message.group.delete.ok=Group deleted - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title=Rights of groups - -table.th.groups = Groups -table.th.rights = Rights - -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. -global.rights = global -special.rights = special - - -# -- page to change special rights for groups -message.group.rights.ok=Rights saved -group.rightres.title=Rights on resources for the group - - -# -- page to list users of each groups -users.title=Rights of users - -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -# -- page to set rights of a specific user -user.rights.title=Rights for - -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights -message.user.rights.ok=Rights saved - -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -# -- page to set special rights of a specific user -user.rightres.title=Rights on resources for - - -# -- labels used in several pages -rights.title=Rights -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! -no.rightres = No special rights - -save.button=Save diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.UTF-8.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.UTF-8.properties deleted file mode 100644 index 378c618058..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_GB/acl2.UTF-8.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - - -# -- main page "Groups of users for rights" -groups.title=Groups of users for rights - -groups.change.rights.link=Change rights of groups - -# form to indicate on which groups a new user is attached by default -groups.new.users.title=Groups of new users -setdefault.button=Set default groups -message.groups.setdefault.ok=Default groups set - -# form to create a new group -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -message.group.create.ok=Group created - -# form to change the name of a group -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -message.group.rename.ok=Group renamed - -# form to remove a group -delete.group=Delete a group -delete.button=Delete -message.group.delete.ok=Group deleted - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title=Rights of groups - -table.th.groups = Groups -table.th.rights = Rights - -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. -global.rights = global -special.rights = special - - -# -- page to change special rights for groups -message.group.rights.ok=Rights saved -group.rightres.title=Rights on resources for the group - - -# -- page to list users of each groups -users.title=Rights of users - -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -# -- page to set rights of a specific user -user.rights.title=Rights for - -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights -message.user.rights.ok=Rights saved - -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -# -- page to set special rights of a specific user -user.rightres.title=Rights on resources for - - -# -- labels used in several pages -rights.title=Rights -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! -no.rightres = No special rights - -save.button=Save diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.ISO-8859-1.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.ISO-8859-1.properties deleted file mode 100644 index 378c618058..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.ISO-8859-1.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - - -# -- main page "Groups of users for rights" -groups.title=Groups of users for rights - -groups.change.rights.link=Change rights of groups - -# form to indicate on which groups a new user is attached by default -groups.new.users.title=Groups of new users -setdefault.button=Set default groups -message.groups.setdefault.ok=Default groups set - -# form to create a new group -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -message.group.create.ok=Group created - -# form to change the name of a group -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -message.group.rename.ok=Group renamed - -# form to remove a group -delete.group=Delete a group -delete.button=Delete -message.group.delete.ok=Group deleted - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title=Rights of groups - -table.th.groups = Groups -table.th.rights = Rights - -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. -global.rights = global -special.rights = special - - -# -- page to change special rights for groups -message.group.rights.ok=Rights saved -group.rightres.title=Rights on resources for the group - - -# -- page to list users of each groups -users.title=Rights of users - -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -# -- page to set rights of a specific user -user.rights.title=Rights for - -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights -message.user.rights.ok=Rights saved - -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -# -- page to set special rights of a specific user -user.rightres.title=Rights on resources for - - -# -- labels used in several pages -rights.title=Rights -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! -no.rightres = No special rights - -save.button=Save diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.ISO-8859-15.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.ISO-8859-15.properties deleted file mode 100644 index 378c618058..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.ISO-8859-15.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - - -# -- main page "Groups of users for rights" -groups.title=Groups of users for rights - -groups.change.rights.link=Change rights of groups - -# form to indicate on which groups a new user is attached by default -groups.new.users.title=Groups of new users -setdefault.button=Set default groups -message.groups.setdefault.ok=Default groups set - -# form to create a new group -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -message.group.create.ok=Group created - -# form to change the name of a group -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -message.group.rename.ok=Group renamed - -# form to remove a group -delete.group=Delete a group -delete.button=Delete -message.group.delete.ok=Group deleted - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title=Rights of groups - -table.th.groups = Groups -table.th.rights = Rights - -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. -global.rights = global -special.rights = special - - -# -- page to change special rights for groups -message.group.rights.ok=Rights saved -group.rightres.title=Rights on resources for the group - - -# -- page to list users of each groups -users.title=Rights of users - -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -# -- page to set rights of a specific user -user.rights.title=Rights for - -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights -message.user.rights.ok=Rights saved - -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -# -- page to set special rights of a specific user -user.rightres.title=Rights on resources for - - -# -- labels used in several pages -rights.title=Rights -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! -no.rightres = No special rights - -save.button=Save diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.UTF-8.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.UTF-8.properties deleted file mode 100644 index 378c618058..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/en_US/acl2.UTF-8.properties +++ /dev/null @@ -1,93 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups=Groups of users for rights -menu.item.rights=Rights of users - - -# -- main page "Groups of users for rights" -groups.title=Groups of users for rights - -groups.change.rights.link=Change rights of groups - -# form to indicate on which groups a new user is attached by default -groups.new.users.title=Groups of new users -setdefault.button=Set default groups -message.groups.setdefault.ok=Default groups set - -# form to create a new group -create.group=Create a group -group.name.label=Label: -group.name.id=Ident: -message.group.create.ok=Group created - -# form to change the name of a group -change.name.title=Change the name -rename.button=Rename -new.name.label=New name: -message.group.rename.ok=Group renamed - -# form to remove a group -delete.group=Delete a group -delete.button=Delete -message.group.delete.ok=Group deleted - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title=Rights of groups - -table.th.groups = Groups -table.th.rights = Rights - -group.help.rights.inherit= "-": undefined right, it can be defined in other groups of the user -group.help.rights.yes= "yes": indicate that the right is set, but can be canceled ("no") in an other group -group.help.rights.no= "no": the right is not assign to this group, and to any other groups of the user. -global.rights = global -special.rights = special - - -# -- page to change special rights for groups -message.group.rights.ok=Rights saved -group.rightres.title=Rights on resources for the group - - -# -- page to list users of each groups -users.title=Rights of users - -filter.title=Filter on the group -show.button=Show -no.user.message=No user. -col.users=Users -rights.link=rights -pages.links.label=Pages: - -anonymous.group.name=Anonymous -all.users.option=All users -without.groups.option=Without group - -# -- page to set rights of a specific user -user.rights.title=Rights for - -has.rights.on.resources = This user has rights on some resources -see.rights.on.resources = See this rights -message.user.rights.ok=Rights saved - -col.personnal.rights=Personal rights -col.personnal.rights.res=Personal rights on resources -col.groups=Groups -col.resulting=Resulting rights -col.subjects = Subjects -col.resources = Resources -remove.group.tooltip=Remove the user from this group -add.group.tooltip=Add the user to this group - -# -- page to set special rights of a specific user -user.rightres.title=Rights on resources for - - -# -- labels used in several pages -rights.title=Rights -rightres.title=Rights on resources -link.return.to.rights=Return to global rights -warning.deleting.rightres=Warning! To remove this rights, you should use the interfaces provided by business\ -modules corresponding to this rights. Use this page only if you know what you do! -no.rightres = No special rights - -save.button=Save diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.ISO-8859-1.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.ISO-8859-1.properties deleted file mode 100644 index 5b92905ed6..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.ISO-8859-1.properties +++ /dev/null @@ -1,92 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups = Groupes d'utilisateurs -menu.item.rights = Droits des utilisateurs - - -# -- main page "Groups of users for rights" -groups.title = Groupes d'utilisateurs pour les droits - -groups.change.rights.link = Changer les droits des groupes - -# form to indicate on which groups a new user is attached by default -groups.new.users.title = Groupes des nouveaux utilisateurs -setdefault.button = Enregistrer -message.groups.setdefault.ok = Les groupes par dfaut ont t enregistrs avec succs ! - -# form to create a new group -create.group = Crer un groupe -group.name.label = Libell : -group.name.id = Identifiant : -message.group.create.ok = Le groupe a t cre avec succs - -# form to change the name of a group -change.name.title = Changer le nom -rename.button = Renommer -new.name.label = Nouveau nom : -message.group.rename.ok = Le groupe a t renomm avec succs - -# form to remove a group -delete.group = Supprimer un groupe -delete.button = Supprimer -message.group.delete.ok = Le groupe a t effac avec succs - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title = Droits des groupes - -table.th.groups = Groupes -table.th.rights = Droits - -group.help.rights.inherit= "-" indique que le droit est indetermin, la valeur des autres groupes de l'utilisateur sera prioritaire -group.help.rights.yes= "oui" indique que le groupe a ce droit, sauf si un autre groupe de l'utilisateur indique "non" -group.help.rights.no= "non" indique que le groupe n'a pas le droit, mme si un autre groupe de l'utilisateur indique "oui". -global.rights = global -special.rights = spcial - - -# -- page to change special rights for groups -message.group.rights.ok = Les droits des groupes ont t enregistrs avec succs -group.rightres.title=Droits sur des ressources pour le groupe - -# -- page to list users of each groups -users.title = Droits des utilisateurs - -filter.title = Filtre sur le groupe -show.button = Afficher -no.user.message = Pas d'utilisateurs. -col.users = Utilisateurs -rights.link = Droits -pages.links.label = Pages : - -anonymous.group.name = Anonymes -all.users.option = Tous les utilisateurs -without.groups.option = Sans groupe - - -# -- page to set rights of a specific user -user.rights.title = Droits pour - -has.rights.on.resources = Cet utilisateur possde des droits sur des ressources -see.rights.on.resources = Voir ces droits -message.user.rights.ok = Les droits ont t enregistrs avec succs - -col.personnal.rights = Droits personnels -col.personnal.rights.res = Droits personnels sur des ressources -col.groups = Groupes -col.resulting = Droits rsultants -col.subjects = Sujets -col.resources = Ressources -remove.group.tooltip = Enlve l'utilisateur du groupe -add.group.tooltip = Ajoute l'utilisateur dans le groupe - -# -- page to set special rights of a specific user -user.rightres.title=Droits sur des ressources pour - -# -- labels used in several pages -rights.title = Droits des utilisateurs -rightres.title=Droits sur des ressources -link.return.to.rights=Retour aux droits globaux -warning.deleting.rightres=Attention! Pour supprimer ces droits, vous devriez plutt utiliser l'interface fournie par les modules metiers correspondant ces droits.\ -N'utilisez cette page que si vous savez absolument ce que vous faites ! -no.rightres = Pas de droits spcifiques - -save.button = Enregistrer diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.ISO-8859-15.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.ISO-8859-15.properties deleted file mode 100644 index 5b92905ed6..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.ISO-8859-15.properties +++ /dev/null @@ -1,92 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups = Groupes d'utilisateurs -menu.item.rights = Droits des utilisateurs - - -# -- main page "Groups of users for rights" -groups.title = Groupes d'utilisateurs pour les droits - -groups.change.rights.link = Changer les droits des groupes - -# form to indicate on which groups a new user is attached by default -groups.new.users.title = Groupes des nouveaux utilisateurs -setdefault.button = Enregistrer -message.groups.setdefault.ok = Les groupes par dfaut ont t enregistrs avec succs ! - -# form to create a new group -create.group = Crer un groupe -group.name.label = Libell : -group.name.id = Identifiant : -message.group.create.ok = Le groupe a t cre avec succs - -# form to change the name of a group -change.name.title = Changer le nom -rename.button = Renommer -new.name.label = Nouveau nom : -message.group.rename.ok = Le groupe a t renomm avec succs - -# form to remove a group -delete.group = Supprimer un groupe -delete.button = Supprimer -message.group.delete.ok = Le groupe a t effac avec succs - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title = Droits des groupes - -table.th.groups = Groupes -table.th.rights = Droits - -group.help.rights.inherit= "-" indique que le droit est indetermin, la valeur des autres groupes de l'utilisateur sera prioritaire -group.help.rights.yes= "oui" indique que le groupe a ce droit, sauf si un autre groupe de l'utilisateur indique "non" -group.help.rights.no= "non" indique que le groupe n'a pas le droit, mme si un autre groupe de l'utilisateur indique "oui". -global.rights = global -special.rights = spcial - - -# -- page to change special rights for groups -message.group.rights.ok = Les droits des groupes ont t enregistrs avec succs -group.rightres.title=Droits sur des ressources pour le groupe - -# -- page to list users of each groups -users.title = Droits des utilisateurs - -filter.title = Filtre sur le groupe -show.button = Afficher -no.user.message = Pas d'utilisateurs. -col.users = Utilisateurs -rights.link = Droits -pages.links.label = Pages : - -anonymous.group.name = Anonymes -all.users.option = Tous les utilisateurs -without.groups.option = Sans groupe - - -# -- page to set rights of a specific user -user.rights.title = Droits pour - -has.rights.on.resources = Cet utilisateur possde des droits sur des ressources -see.rights.on.resources = Voir ces droits -message.user.rights.ok = Les droits ont t enregistrs avec succs - -col.personnal.rights = Droits personnels -col.personnal.rights.res = Droits personnels sur des ressources -col.groups = Groupes -col.resulting = Droits rsultants -col.subjects = Sujets -col.resources = Ressources -remove.group.tooltip = Enlve l'utilisateur du groupe -add.group.tooltip = Ajoute l'utilisateur dans le groupe - -# -- page to set special rights of a specific user -user.rightres.title=Droits sur des ressources pour - -# -- labels used in several pages -rights.title = Droits des utilisateurs -rightres.title=Droits sur des ressources -link.return.to.rights=Retour aux droits globaux -warning.deleting.rightres=Attention! Pour supprimer ces droits, vous devriez plutt utiliser l'interface fournie par les modules metiers correspondant ces droits.\ -N'utilisez cette page que si vous savez absolument ce que vous faites ! -no.rightres = Pas de droits spcifiques - -save.button = Enregistrer diff --git a/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.UTF-8.properties b/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.UTF-8.properties deleted file mode 100644 index e67d534b1d..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/locales/fr_FR/acl2.UTF-8.properties +++ /dev/null @@ -1,92 +0,0 @@ -# -- labels of menu items in the System menu -menu.item.groups = Groupes d'utilisateurs -menu.item.rights = Droits des utilisateurs - - -# -- main page "Groups of users for rights" -groups.title = Groupes d'utilisateurs pour les droits - -groups.change.rights.link = Changer les droits des groupes - -# form to indicate on which groups a new user is attached by default -groups.new.users.title = Groupes des nouveaux utilisateurs -setdefault.button = Enregistrer -message.groups.setdefault.ok = Les groupes par défaut ont été enregistrés avec succès ! - -# form to create a new group -create.group = Créer un groupe -group.name.label = Libellé : -group.name.id = Identifiant : -message.group.create.ok = Le groupe a été crée avec succès - -# form to change the name of a group -change.name.title = Changer le nom -rename.button = Renommer -new.name.label = Nouveau nom : -message.group.rename.ok = Le groupe a été renommé avec succès - -# form to remove a group -delete.group = Supprimer un groupe -delete.button = Supprimer -message.group.delete.ok = Le groupe a été effacé avec succès - -# -- page to change rights of all groups "Rights of groups" -groups.rights.title = Droits des groupes - -table.th.groups = Groupes -table.th.rights = Droits - -group.help.rights.inherit= "-" indique que le droit est indeterminé, la valeur des autres groupes de l'utilisateur sera prioritaire -group.help.rights.yes= "oui" indique que le groupe a ce droit, sauf si un autre groupe de l'utilisateur indique "non" -group.help.rights.no= "non" indique que le groupe n'a pas le droit, même si un autre groupe de l'utilisateur indique "oui". -global.rights = global -special.rights = spécial - - -# -- page to change special rights for groups -message.group.rights.ok = Les droits des groupes ont été enregistrés avec succès -group.rightres.title=Droits sur des ressources pour le groupe - -# -- page to list users of each groups -users.title = Droits des utilisateurs - -filter.title = Filtre sur le groupe -show.button = Afficher -no.user.message = Pas d'utilisateurs. -col.users = Utilisateurs -rights.link = Droits -pages.links.label = Pages : - -anonymous.group.name = Anonymes -all.users.option = Tous les utilisateurs -without.groups.option = Sans groupe - - -# -- page to set rights of a specific user -user.rights.title = Droits pour - -has.rights.on.resources = Cet utilisateur possède des droits sur des ressources -see.rights.on.resources = Voir ces droits -message.user.rights.ok = Les droits ont été enregistrés avec succès - -col.personnal.rights = Droits personnels -col.personnal.rights.res = Droits personnels sur des ressources -col.groups = Groupes -col.resulting = Droits résultants -col.subjects = Sujets -col.resources = Ressources -remove.group.tooltip = Enlève l'utilisateur du groupe -add.group.tooltip = Ajoute l'utilisateur dans le groupe - -# -- page to set special rights of a specific user -user.rightres.title=Droits sur des ressources pour - -# -- labels used in several pages -rights.title = Droits des utilisateurs -rightres.title=Droits sur des ressources -link.return.to.rights=Retour aux droits globaux -warning.deleting.rightres=Attention! Pour supprimer ces droits, vous devriez plutôt utiliser l'interface fournie par les modules metiers correspondant à ces droits.\ -N'utilisez cette page que si vous savez absolument ce que vous faites ! -no.rightres = Pas de droits spécifiques - -save.button = Enregistrer diff --git a/lib/jelix-admin-modules/jacl2db_admin/module.xml b/lib/jelix-admin-modules/jacl2db_admin/module.xml deleted file mode 100644 index e67d0b4b1d..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/module.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 1.3 - - Web interface to manage rights with jAcl2 and its driver 'db' - GPL 2.0 - 2008-2011 Laurent Jouanneau and other contributors - - http://jelix.org - - - - - - diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/group_rights_res.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/group_rights_res.tpl deleted file mode 100644 index 6f4786c596..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/group_rights_res.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.group.rightres.title@} {$groupname}

- - -
-
{@jacl2db_admin~acl2.rightres.title@} -
{formurlparam 'jacl2db_admin~groups:saverightres',array('group'=>$groupid)}
- -{if count($rightsWithResources)} -

{@jacl2db_admin~acl2.warning.deleting.rightres@}

- - - - - - - - - - - - - - - -{foreach $rightsWithResources as $subject=>$resources} - - - - -{/foreach} - -
{@jacl2db_admin~acl2.col.subjects@}{@jacl2db_admin~acl2.col.resources@}
- - - {assign $firstr=true} - {foreach $resources as $r}{if !$firstr}, {else}{assign $firstr=false}{/if} - {$r->id_aclres|eschtml}{/foreach}
-{else} -

{@jacl2db_admin~acl2.no.rightres@}

-{/if} -
-
- -

{@jacl2db_admin~acl2.link.return.to.rights@}.

- diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/group_rights_res_view.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/group_rights_res_view.tpl deleted file mode 100644 index 779547fa31..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/group_rights_res_view.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.group.rightres.title@} {$groupname}

- - - - - - - - - -{foreach $rightsWithResources as $subject=>$resources} - - - - -{/foreach} - -
{@jacl2db_admin~acl2.col.subjects@}{@jacl2db_admin~acl2.col.resources@}
{$subjects_localized[$subject]|eschtml}{assign $firstr=true} - {foreach $resources as $r}{if !$firstr}, {else}{assign $firstr=false}{/if} - {$r->id_aclres|eschtml}{/foreach}
- -

{@jacl2db_admin~acl2.link.return.to.rights@}.

- diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/groups_edit.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/groups_edit.tpl deleted file mode 100644 index c774a4954a..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/groups_edit.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.groups.title@}

- -{ifacl2 'acl.group.modify'} - -

{@jacl2db_admin~acl2.groups.change.rights.link@}

- -
-
{@jacl2db_admin~acl2.groups.new.users.title@} -{formurlparam 'jacl2db_admin~groups:setdefault'} - {foreach $groups as $group} - - {/foreach} -
- -
-
- -
-
{@jacl2db_admin~acl2.change.name.title@} -{formurlparam 'jacl2db_admin~groups:changename'} - - - - -
-
-{/ifacl2} - -{ifacl2 'acl.group.create'} -
-
{@jacl2db_admin~acl2.create.group@} -{formurlparam 'jacl2db_admin~groups:newgroup'} - - - -
-
-{/ifacl2} - -{ifacl2 'acl.group.delete'} -
-
{@jacl2db_admin~acl2.delete.group@} -{formurlparam 'jacl2db_admin~groups:delgroup'} - - - -
-
-{/ifacl2} - diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/groups_right.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/groups_right.tpl deleted file mode 100644 index a595d9ebfc..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/groups_right.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.groups.rights.title@}

- -
-
{@jacl2db_admin~acl2.rights.title@} -
{formurlparam 'jacl2db_admin~groups:saverights'}
- - - - - - - - {foreach $groups as $group} - - {/foreach} - - - - {foreach $groups as $group} - - - {/foreach} - - - -{assign $currentsbjgroup = '---'} -{foreach $rights as $subject=>$right} -{if $subjects[$subject]['grp'] && $currentsbjgroup != $subjects[$subject]['grp']} - - -{assign $currentsbjgroup = $subjects[$subject]['grp']} -{/if} - - - {foreach $right as $group=>$r} - - - {/foreach} - -{/foreach} - -
{@jacl2db_admin~acl2.table.th.groups@}
{$group->name}
{@jacl2db_admin~acl2.table.th.rights@}{@jacl2db_admin~acl2.global.rights@}{@jacl2db_admin~acl2.special.rights@}

{$sbjgroups_localized[$subjects[$subject]['grp']]}

{$subjects[$subject]['label']|eschtml} - {if isset($rightsWithResources[$subject][$group]) && $rightsWithResources[$subject][$group]} - yes - {/if}
-
-
    -
  • {@jacl2db_admin~acl2.group.help.rights.inherit@}
  • -
  • {@jacl2db_admin~acl2.group.help.rights.yes@}
  • -
  • {@jacl2db_admin~acl2.group.help.rights.no@}
  • -
-
-
-
-
- diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/groups_right_view.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/groups_right_view.tpl deleted file mode 100644 index c464b71911..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/groups_right_view.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.groups.rights.title@}

- - - - - - - - - {foreach $groups as $group} - - {/foreach} - - - - {foreach $groups as $group} - - - {/foreach} - - - - - - {foreach $groups as $group} - - - {/foreach} - - - -{assign $currentsbjgroup = '---'} -{foreach $rights as $subject=>$right} -{if $subjects[$subject]['grp'] && $currentsbjgroup != $subjects[$subject]['grp']} - - -{assign $currentsbjgroup = $subjects[$subject]['grp']} -{/if} - - - {foreach $right as $group=>$r} - - - {/foreach} - -{/foreach} - -
{@jacl2db_admin~acl2.table.th.groups@}
{$group->name}
{@jacl2db_admin~acl2.table.th.rights@}globalon res
see

{$sbjgroups_localized[$subjects[$subject]['grp']]}

{$subjects[$subject]['label']|eschtml} - {if $r == ''}-{/if} - {if $r == 'y'}yes{/if} - {if $r == 'n'}no{/if} - {if isset($rightsWithResources[$subject][$group]) && $rightsWithResources[$subject][$group]}yes{/if}
diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights.tpl deleted file mode 100644 index 16e4f6a8ac..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights.tpl +++ /dev/null @@ -1,94 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.user.rights.title@} {$user}

- - -
-
{@jacl2db_admin~acl2.rights.title@} - -
{formurlparam 'jacl2db_admin~users:saverights',array('user'=>$user)}
- - - - - - - {if $nbgrp} - - {/if} - - - - - {foreach $groups as $group} - {if isset($groupsuser[$group->id_aclgrp])} - - {else} - - {/if} - {/foreach} - - - - - - - - {if $nbgrp} - - {/if} - - - - - -{assign $currentsbjgroup = '---'} -{foreach $rights as $subject=>$right} - -{if $subjects[$subject]['grp'] && $currentsbjgroup != $subjects[$subject]['grp']} - - -{assign $currentsbjgroup = $subjects[$subject]['grp']} -{/if} - - - {assign $resultr=''} - {foreach $right as $group=>$r} - {if $hisgroup && $group == $hisgroup->id_aclgrp} - {if $r=='y' && $resultr==''}{assign $resultr='y'}{/if} - {if $r=='n'}{assign $resultr='n'}{/if} - - - {else} - - {/if} - {/foreach} - - - -{/foreach} - -
{@jacl2db_admin~acl2.col.personnal.rights@}{@jacl2db_admin~acl2.col.personnal.rights.res@}{@jacl2db_admin~acl2.col.groups@}{@jacl2db_admin~acl2.col.resulting@}
{$group->name} -{$group->name} +

{$sbjgroups_localized[$subjects[$subject]['grp']]}

- - - {if $rightsWithResources[$subject]}yes{/if} - {if $r =='y'}yes - {elseif $r=='n'}no{/if} - {else}> - {if $r =='y'}yes{if $resultr==''}{assign $resultr='y'}{/if} - {elseif $r=='n'}no{assign $resultr='n'}{/if} - {/if} - - {if $resultr =='y'}yes - {else}no{/if} -
-{if $hasRightsOnResources} -

{@jacl2db_admin~acl2.has.rights.on.resources@}. {@jacl2db_admin~acl2.see.rights.on.resources@}.

-{/if} -
-
- diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_res.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_res.tpl deleted file mode 100644 index 3092a19b2a..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_res.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.user.rightres.title@} {$user}

- - -
-
{@jacl2db_admin~acl2.rightres.title@} -
{formurlparam 'jacl2db_admin~users:saverightres',array('user'=>$user)}
-{if count($rightsWithResources)} - -

{@jacl2db_admin~acl2.warning.deleting.rightres@}

- - - - - - - - - - - - - - - -{foreach $rightsWithResources as $subject=>$resources} - - - - -{/foreach} - -
{@jacl2db_admin~acl2.col.subjects@}{@jacl2db_admin~acl2.col.resources@}
- - - {assign $firstr=true} - {foreach $resources as $r}{if !$firstr}, {else}{assign $firstr=false}{/if} - {$r->id_aclres|eschtml}{/foreach}
-{else} -

{@jacl2db_admin~acl2.no.rightres@}

-{/if} -
-
- -

{@jacl2db_admin~acl2.link.return.to.rights@}.

- diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_res_view.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_res_view.tpl deleted file mode 100644 index ba66df69b8..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_res_view.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.user.rightres.title@} {$user}

- - - - - - - - - -{foreach $rightsWithResources as $subject=>$resources} - - - - -{/foreach} - -
{@jacl2db_admin~acl2.col.subjects@}{@jacl2db_admin~acl2.col.resources@}
{$subjects_localized[$subject]|eschtml}{assign $firstr=true} - {foreach $resources as $r}{if !$firstr}, {else}{assign $firstr=false}{/if} - {$r->id_aclres|eschtml}{/foreach}
- -

{@jacl2db_admin~acl2.link.return.to.rights@}.

- diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_view.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_view.tpl deleted file mode 100644 index 55e567078a..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/user_rights_view.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - -

{@jacl2db_admin~acl2.user.rights.title@} {$user}

- - - - - - - - {if $nbgrp} - - {/if} - - - - - {foreach $groups as $group} - {if isset($groupsuser[$group->id_aclgrp])} - - {else} - - {/if} - {/foreach} - - - -{assign $currentsbjgroup = '---'} -{foreach $rights as $subject=>$right} - -{if $subjects[$subject]['grp'] && $currentsbjgroup != $subjects[$subject]['grp']} - - -{assign $currentsbjgroup = $subjects[$subject]['grp']} -{/if} - - - {assign $resultr=''} - {foreach $right as $group=>$r} - {if $hisgroup && $group == $hisgroup->id_aclgrp} - {if $r=='y' && $resultr==''}{assign $resultr='y'}{/if} - {if $r=='n'}{assign $resultr='n'}{/if} - - - {else} - - {/if} - {/foreach} - - - -{/foreach} - -
{@jacl2db_admin~acl2.col.personnal.rights@}{@jacl2db_admin~acl2.col.personnal.rights.res@}{@jacl2db_admin~acl2.col.groups@}{@jacl2db_admin~acl2.col.resulting@}
{$group->name}{$group->name}

{$sbjgroups_localized[$subjects[$subject]['grp']]}

{$subjects[$subject]['label']|eschtml} - {if $r =='y'}yes{if $resultr==''}{assign $resultr='y'}{/if} - {elseif $r=='n'}no{assign $resultr='n'}{/if} - {if $rightsWithResources[$subject]}yes{/if} - {if $r =='y'}yes - {elseif $r=='n'}no{/if} - {else}> - {if $r =='y'}yes{if $resultr==''}{assign $resultr='y'}{/if} - {elseif $r=='n'}no{assign $resultr='n'}{/if} - {/if} - - {if $resultr =='y'}yes - {else}no{/if} -
-{if $hasRightsOnResources} -

{@jacl2db_admin~acl2.has.rights.on.resources@}. {@jacl2db_admin~acl2.see.rights.on.resources@}.

-{/if} diff --git a/lib/jelix-admin-modules/jacl2db_admin/templates/users_list.tpl b/lib/jelix-admin-modules/jacl2db_admin/templates/users_list.tpl deleted file mode 100644 index c3d8b9b5a4..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/templates/users_list.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{meta_html css $j_jelixwww.'design/jacl2.css'} - - -

{@jacl2db_admin~acl2.users.title@}

- -
-
- - - -
-
- -
-
{@jacl2db_admin~acl2.filter.title@} -{formurlparam 'jacl2db_admin~users:index'} - - -
-
- -{if $usersCount == 0} -

{@jacl2db_admin~acl2.no.user.message@}

-{else} - - - - - - - - - -{assign $line = true} -{foreach $users as $user} - - - - - -{assign $line = !$line} -{/foreach} - -
{@jacl2db_admin~acl2.col.users@}{@jacl2db_admin~acl2.col.groups@}
{$user->login}{foreach $user->groups as $group} {$group->name} {/foreach}{@jacl2db_admin~acl2.rights.link@}
-{/if} - -{if $usersCount > $listPageSize} -
{@jacl2db_admin~acl2.pages.links.label@} {pagelinks 'jacl2db_admin~users:index', array('grpid'=>$grpid), $usersCount, $offset, $listPageSize, 'idx' }
-{/if} - - - diff --git a/lib/jelix-admin-modules/jacl2db_admin/urls.xml b/lib/jelix-admin-modules/jacl2db_admin/urls.xml deleted file mode 100644 index 93fd255076..0000000000 --- a/lib/jelix-admin-modules/jacl2db_admin/urls.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - diff --git a/lib/jelix-admin-modules/jauthdb_admin/classes/jauthdb_admin.listener.php b/lib/jelix-admin-modules/jauthdb_admin/classes/jauthdb_admin.listener.php deleted file mode 100644 index 704147fcbe..0000000000 --- a/lib/jelix-admin-modules/jauthdb_admin/classes/jauthdb_admin.listener.php +++ /dev/null @@ -1,26 +0,0 @@ -getPlugin('auth', false); - $driver = $plugin->config['driver']; - $hasDao = isset($plugin->config[$driver]['dao']) && isset($plugin->config[$driver]['compatiblewithdb']) && $plugin->config[$driver]['compatiblewithdb']; - if ($plugin && ($driver == 'Db' || $hasDao) && jAcl2::check('auth.users.list')) { - $item = new masterAdminMenuItem('users', jLocale::get('jauthdb_admin~auth.adminmenu.item.list'), jUrl::get('jauthdb_admin~default:index'), 10, 'system'); - $item->icon = jApp::config()->urlengine['jelixWWWPath'] . 'design/images/user.png'; - $event->add($item); - } - } -} diff --git a/lib/jelix-admin-modules/jauthdb_admin/controllers/default.classic.php b/lib/jelix-admin-modules/jauthdb_admin/controllers/default.classic.php deleted file mode 100644 index be91da369e..0000000000 --- a/lib/jelix-admin-modules/jauthdb_admin/controllers/default.classic.php +++ /dev/null @@ -1,372 +0,0 @@ -array('jacl2.right'=>'auth.users.list'), - 'view' =>array('jacl2.right'=>'auth.users.view'), - 'precreate' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.create')), - 'create' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.create')), - 'savecreate' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.create')), - 'preupdate' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.modify')), - 'editupdate' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.modify')), - 'saveupdate' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.modify')), - 'deleteconfirm'=>array('jacl2.rights.and'=>array('auth.users.view','auth.users.delete')), - 'delete' =>array('jacl2.rights.and'=>array('auth.users.view','auth.users.delete')), - ); - /** - * selector of the dao to use for the crud. - * @var string - */ - protected $dao = ''; - - /** - * selector of the form to use to edit and display a record - * @var string - */ - protected $form =''; - - /** - * the jDb profile to use with the dao - */ - protected $dbProfile = ''; - - protected $listPageSize = 20; - - protected $authConfig = null; - - protected $uploadsDirectory=''; - - function __construct ($request){ - parent::__construct($request); - $plugin = jApp::coord()->getPlugin('auth'); - $driver = $plugin->config['driver']; - $hasDao = isset($plugin->config[$driver]['dao']) && isset($plugin->config[$driver]['compatiblewithdb']) && $plugin->config[$driver]['compatiblewithdb']; - if (($driver == 'Db') || $hasDao) { - $this->authConfig = $plugin->config[$driver]; - $this->dao = $this->authConfig['dao']; - if(isset($this->authConfig['form'])) - $this->form = $this->authConfig['form']; - $this->dbProfile = $this->authConfig['profile']; - if(isset($this->authConfig['uploadsDirectory'])) - $this->uploadsDirectory = $this->authConfig['uploadsDirectory']; - } - } - - /** - * list all users - */ - function index(){ - $offset = $this->intParam('offset',0,true); - - $rep = $this->getResponse('html'); - - if ($this->form == '') { - $rep->body->assign('MAIN', 'no form defined in the auth plugin'); - return $rep; - } - - $tpl = new jTpl(); - - $dao = jDao::get($this->dao, $this->dbProfile); - - $cond = jDao::createConditions(); - $cond->addItemOrder('login', 'asc'); - $tpl->assign('list', $dao->findBy($cond,$offset,$this->listPageSize)); - - $pk = $dao->getPrimaryKeyNames(); - $tpl->assign('primarykey', $pk[0]); - - $tpl->assign('controls', jForms::create($this->form, '___$$$___')->getControls()); - $tpl->assign('listPageSize', $this->listPageSize); - $tpl->assign('page',$offset); - $tpl->assign('recordCount',$dao->countAll()); - $tpl->assign('cancreate', jAcl2::check('auth.users.create')); - $tpl->assign('canview', jAcl2::check('auth.users.view')); - $rep->body->assign('MAIN', $tpl->fetch('crud_list')); - $rep->body->assign('selectedMenuItem', 'users'); - jForms::destroy($this->form, '___$$$___'); - return $rep; - } - - /** - * displays a user - */ - function view(){ - $id = $this->param('j_user_login'); - if( $id === null ){ - $rep = $this->getResponse('redirect'); - jMessage::add(jLocale::get('crud.message.bad.id', 'null'), 'error'); - $rep->action = 'default:index'; - return $rep; - } - $dao = jDao::create($this->dao, $this->dbProfile); - $daorec = $dao->get($id); - if(!$daorec) { - $rep = $this->getResponse('redirect'); - jMessage::add(jLocale::get('crud.message.bad.id', $id), 'error'); - $rep->action = 'default:index'; - return $rep; - } - - $rep = $this->getResponse('html'); - - // we're using a form to display a record, to have the portunity to have - // labels with each values. - $form = jForms::create($this->form, $id); - $form->initFromDao($this->dao, $id, $this->dbProfile); - - $tpl = new jTpl(); - $tpl->assign('id', $id); - $tpl->assign('form',$form); - $tpl->assign('otherInfo', jEvent::notify('jauthdbAdminGetViewInfo', array('form'=>$form, 'tpl'=>$tpl, 'himself'=>false))->getResponse()); - $form->deactivate('password'); - $form->deactivate('password_confirm'); - $tpl->assign('canDelete', (jAuth::getUserSession()->login != $id) && jAcl2::check('auth.users.delete')); - $tpl->assign('canUpdate', jAcl2::check('auth.users.modify')); - $tpl->assign('canChangePass', jAcl2::check('auth.users.change.password')); - $rep->body->assign('MAIN', $tpl->fetch('crud_view')); - return $rep; - } - - /** - * prepare a form to create a record. - */ - function precreate() { - $form = jForms::create($this->form); - $form->deactivate('password', false); - $form->deactivate('password_confirm', false); - jEvent::notify('jauthdbAdminPrepareCreate', array('form'=>$form)); - - $rep = $this->getResponse('redirect'); - $rep->action = 'default:create'; - return $rep; - } - - /** - * display a form to create a record - */ - function create(){ - $form = jForms::get($this->form); - if($form == null){ - $form = jForms::create($this->form); - } - $rep = $this->getResponse('html'); - - $tpl = new jTpl(); - $tpl->assign('id', null); - $tpl->assign('form',$form); - $tpl->assign('randomPwd', jAuth::getRandomPassword()); - jEvent::notify('jauthdbAdminEditCreate', array('form'=>$form, 'tpl'=>$tpl)); - - $rep->body->assign('MAIN', $tpl->fetch('crud_edit')); - return $rep; - } - - /** - * save data of a form in a new record - */ - function savecreate(){ - $form = jForms::get($this->form); - $rep = $this->getResponse('redirect'); - if($form == null){ - jMessage::add(jLocale::get('crud.message.bad.form'), 'error'); - $rep->action = 'default:index'; - return $rep; - } - $form->initFromRequest(); - $evresp = array(); - if($form->check() && !jEvent::notify('jauthdbAdminCheckCreateForm', array('form'=>$form))->inResponse('check', false, $evresp)){ - $props = jDao::createRecord($this->dao, $this->dbProfile)->getProperties(); - - $user = jAuth::createUserObject($form->getData('login'),$form->getData('password')); - - $form->setData('password', $user->password); - $form->prepareObjectFromControls($user, $props); - $form->saveAllFiles($this->uploadsDirectory); - - jAuth::saveNewUser($user); - - jForms::destroy($this->form); - jMessage::add(jLocale::get('crud.message.create.ok', $user->login), 'notice'); - $rep->action = 'default:view'; - $rep->params['j_user_login'] = $user->login; - return $rep; - } else { - $rep->action = 'default:create'; - return $rep; - } - } - - - /** - * prepare a form in order to edit an existing record, and redirect to the editupdate action - */ - function preupdate(){ - $id = $this->param('j_user_login'); - $rep = $this->getResponse('redirect'); - - if( $id === null ){ - jMessage::add(jLocale::get('crud.message.bad.id','null'), 'error'); - $rep->action = 'default:index'; - return $rep; - } - $rep->params['j_user_login'] = $id; - - $form = jForms::create($this->form, $id); - - try { - $rec = $form->initFromDao($this->dao, null, $this->dbProfile); - foreach($rec->getPrimaryKeyNames() as $pkn) { - $c = $form->getControl($pkn); - if($c !==null) { - $c->setReadOnly(true); - } - } - }catch(Exception $e){ - $rep->action = 'default:view'; - return $rep; - } - - jEvent::notify('jauthdbAdminPrepareUpdate', array('form'=>$form, 'himself'=>false)); - $form->setReadOnly('login'); - $form->deactivate('password'); - $form->deactivate('password_confirm'); - $rep->action = 'default:editupdate'; - return $rep; - } - - - /** - * displays a forms to edit an existing record. The form should be - * prepared with the preupdate before, so a refresh of the page - * won't cause a reset of the form - */ - function editupdate(){ - $id = $this->param('j_user_login'); - $form = jForms::get($this->form,$id); - if( $form === null || $id === null){ - $rep = $this->getResponse('redirect'); - $rep->action = 'default:index'; - jMessage::add(jLocale::get('crud.message.bad.id', $id), 'error'); - return $rep; - } - $rep = $this->getResponse('html'); - - $tpl = new jTpl(); - $tpl->assign('id', $id); - $tpl->assign('form',$form); - jEvent::notify('jauthdbAdminEditUpdate', array('form'=>$form, 'tpl'=>$tpl, 'himself'=>false)); - $form->deactivate('password'); //for security - $form->deactivate('password_confirm'); - $form->setReadOnly('login'); - $rep->body->assign('MAIN', $tpl->fetch('crud_edit')); - return $rep; - } - - - /** - * save data of a form in a new record - */ - function saveupdate(){ - $rep = $this->getResponse('redirect'); - $id = $this->param('j_user_login'); - - if( $id === null){ - jMessage::add(jLocale::get('crud.message.bad.id', 'null'), 'error'); - $rep->action = 'default:index'; - return $rep; - } - - $form = jForms::get($this->form,$id); - - if( $form === null){ - jMessage::add(jLocale::get('crud.message.bad.form'), 'error'); - $rep->action = 'default:index'; - return $rep; - } - - $form->initFromRequest(); - - $evresp = array(); - if($form->check() && !jEvent::notify('jauthdbAdminCheckUpdateForm', array('form'=>$form, 'himself'=>false))->inResponse('check', false, $evresp)){ - $results = $form->prepareDaoFromControls($this->dao,$id,$this->dbProfile); - extract($results, EXTR_PREFIX_ALL, "form"); - // we call jAuth instead of using jDao, to allow jAuth to do - // all process, events... - jAuth::updateUser($form_daorec); - - $form->saveAllFiles($this->uploadsDirectory); - $rep->action = 'default:view'; - jMessage::add(jLocale::get('crud.message.update.ok', $id), 'notice'); - jForms::destroy($this->form, $id); - } else { - $rep->action = 'default:editupdate'; - } - $rep->params['j_user_login'] = $id; - return $rep; - } - - - function confirmdelete(){ - $id = $this->param('j_user_login'); - if($id === null){ - jMessage::add(jLocale::get('crud.message.bad.id', 'null'), 'error'); - $rep = $this->getResponse('redirect'); - $rep->action = 'default:index'; - return $rep; - } - $rep = $this->getResponse('html'); - - $tpl = new jTpl(); - $tpl->assign('id', $id); - $rep->body->assign('MAIN', $tpl->fetch('crud_delete')); - return $rep; - } - - /** - * delete a record - */ - function delete(){ - $id = $this->param('j_user_login'); - $pwd = $this->param('pwd_confirm'); - $rep = $this->getResponse('redirect'); - - if (jAuth::verifyPassword(jAuth::getUserSession()->login, $pwd) == false) { - jMessage::add(jLocale::get('crud.message.delete.invalid.pwd'), 'error'); - $rep->action = 'default:confirmdelete'; - $rep->params['j_user_login'] = $id; - return $rep; - } - - if( $id !== null && jAuth::getUserSession()->login != $id){ - if(jAuth::removeUser($id)) { - jMessage::add(jLocale::get('crud.message.delete.ok', $id), 'notice'); - $rep->action = 'default:index'; - } - else{ - jMessage::add(jLocale::get('crud.message.delete.notok'), 'error'); - $rep->action = 'default:view'; - $rep->params['j_user_login'] = $id; - } - } - else { - jMessage::add(jLocale::get('crud.message.delete.notok'), 'error'); - $rep->action = 'default:index'; - } - return $rep; - } - -} - diff --git a/lib/jelix-admin-modules/jauthdb_admin/controllers/password.classic.php b/lib/jelix-admin-modules/jauthdb_admin/controllers/password.classic.php deleted file mode 100644 index 3933bc63e0..0000000000 --- a/lib/jelix-admin-modules/jauthdb_admin/controllers/password.classic.php +++ /dev/null @@ -1,91 +0,0 @@ -array('jacl2.rights.or'=>array('auth.users.change.password','auth.user.change.password')), - ); - - protected function isPersonalView() { - return !jAcl2::check('auth.users.change.password'); - } - - function index(){ - $id = $this->param('j_user_login'); - if($id === null){ - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - $personalView = $this->isPersonalView(); - if ($personalView && $id != jAuth::getUserSession()->login) { - jMessage::add(jLocale::get('jacl2~errors.action.right.needed'), 'error'); - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - $rep = $this->getResponse('html'); - - $tpl = new jTpl(); - $tpl->assign('id', $id); - $tpl->assign('randomPwd', jAuth::getRandomPassword()); - $tpl->assign('personalview', $personalView); - if ($personalView) - $tpl->assign('viewaction', 'user:index'); - else - $tpl->assign('viewaction', 'default:view'); - $rep->body->assign('MAIN', $tpl->fetch('password_change')); - return $rep; - } - - /** - * - */ - function update(){ - $id = $this->param('j_user_login'); - $pwd = $this->param('pwd'); - $pwdconf = $this->param('pwd_confirm'); - $rep = $this->getResponse('redirect'); - - $personalView = $this->isPersonalView(); - if ($personalView && $id != jAuth::getUserSession()->login) { - jMessage::add(jLocale::get('jacl2~errors.action.right.needed'), 'error'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - if (trim($pwd) == '' || $pwd != $pwdconf) { - jMessage::add(jLocale::get('crud.message.bad.password'), 'error'); - $rep->action = 'password:index'; - $rep->params['j_user_login'] = $id; - return $rep; - } - - if(jAuth::changePassword($id, $pwd)) { - jMessage::add(jLocale::get('crud.message.change.password.ok', $id), 'notice'); - if ($personalView) - $rep->action = 'user:index'; - else - $rep->action = 'default:view'; - $rep->params['j_user_login'] = $id; - return $rep; - } - else{ - jMessage::add(jLocale::get('crud.message.change.password.notok'), 'error'); - $rep->action = 'password:index'; - $rep->params['j_user_login'] = $id; - } - return $rep; - } -} - diff --git a/lib/jelix-admin-modules/jauthdb_admin/controllers/user.classic.php b/lib/jelix-admin-modules/jauthdb_admin/controllers/user.classic.php deleted file mode 100644 index 1bd23c20b5..0000000000 --- a/lib/jelix-admin-modules/jauthdb_admin/controllers/user.classic.php +++ /dev/null @@ -1,218 +0,0 @@ -array('jacl2.right'=>'auth.user.view'), - 'preupdate' =>array('jacl2.rights.and'=>array('auth.user.view','auth.user.modify')), - 'editupdate' =>array('jacl2.rights.and'=>array('auth.user.view','auth.user.modify')), - 'saveupdate' =>array('jacl2.rights.and'=>array('auth.user.view','auth.user.modify')), - ); - /** - * selector of the dao to use for the crud. - * @var string - */ - protected $dao = ''; - - /** - * selector of the form to use to edit and display a record - * @var string - */ - protected $form =''; - - /** - * the jDb profile to use with the dao - */ - protected $dbProfile = ''; - - protected $authConfig = null; - - protected $uploadsDirectory=''; - - function __construct ($request){ - parent::__construct($request); - $plugin = jApp::coord()->getPlugin('auth'); - $driver = $plugin->config['driver']; - $hasDao = isset($plugin->config[$driver]['dao']) && isset($plugin->config[$driver]['compatiblewithdb']) && $plugin->config[$driver]['compatiblewithdb']; - if (($driver == 'Db') || $hasDao) { - $this->authConfig = $plugin->config[$driver]; - $this->dao = $this->authConfig['dao']; - if(isset($this->authConfig['form'])) - $this->form = $this->authConfig['form']; - $this->dbProfile = $this->authConfig['profile']; - if(isset($this->authConfig['uploadsDirectory'])) - $this->uploadsDirectory = $this->authConfig['uploadsDirectory']; - } - } - - /** - * - */ - function index(){ - $id = $this->param('j_user_login'); - if( $id === null ){ - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - if ($id != jAuth::getUserSession()->login) { - jMessage::add(jLocale::get('jacl2~errors.action.right.needed'), 'error'); - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - $rep = $this->getResponse('html'); - - // we're using a form to display a record, to have the portunity to have - // labels with each values. - $form = jForms::create($this->form, $id); - $form->initFromDao($this->dao, $id, $this->dbProfile); - - $tpl = new jTpl(); - $tpl->assign('id', $id); - $tpl->assign('form',$form); - $tpl->assign('personalview', true); - $tpl->assign('otherInfo', jEvent::notify('jauthdbAdminGetViewInfo', array('form'=>$form, 'tpl'=>$tpl, 'himself'=>true))->getResponse()); - $form->deactivate('password'); - $form->deactivate('password_confirm'); - $tpl->assign('canUpdate', jAcl2::check('auth.user.modify')); - $tpl->assign('canChangePass', jAcl2::check('auth.user.change.password')); - $rep->body->assign('MAIN', $tpl->fetch('user_view')); - return $rep; - } - - - /** - * prepare a form in order to edit an existing record, and redirect to the editupdate action - */ - function preupdate(){ - $id = $this->param('j_user_login'); - $rep = $this->getResponse('redirect'); - - if( $id === null ){ - $rep->action = 'master_admin~default:index'; - return $rep; - } - - if ($id != jAuth::getUserSession()->login) { - jMessage::add(jLocale::get('jacl2~errors.action.right.needed'), 'error'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - $rep->params['j_user_login'] = $id; - - $form = jForms::create($this->form, $id); - - try { - $rec = $form->initFromDao($this->dao, null, $this->dbProfile); - foreach($rec->getPrimaryKeyNames() as $pkn) { - $c = $form->getControl($pkn); - if($c !==null) { - $c->setReadOnly(true); - } - } - }catch(Exception $e){ - $rep->action = 'default:view'; - return $rep; - } - - jEvent::notify('jauthdbAdminPrepareUpdate', array('form'=>$form, 'himself'=>true)); - $form->setReadOnly('login'); - $form->deactivate('password'); - $form->deactivate('password_confirm'); - $rep->action = 'user:editupdate'; - return $rep; - } - - - /** - * displays a forms to edit an existing record. The form should be - * prepared with the preupdate before, so a refresh of the page - * won't cause a reset of the form - */ - function editupdate(){ - $id = $this->param('j_user_login'); - $form = jForms::get($this->form,$id); - if( $form === null || $id === null){ - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - if ($id != jAuth::getUserSession()->login) { - jMessage::add(jLocale::get('jacl2~errors.action.right.needed'), 'error'); - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - $rep = $this->getResponse('html'); - - $tpl = new jTpl(); - $tpl->assign('id', $id); - $tpl->assign('form',$form); - $tpl->assign('saveaction', 'user:saveupdate'); - $tpl->assign('viewaction', 'user:index'); - jEvent::notify('jauthdbAdminEditUpdate', array('form'=>$form, 'tpl'=>$tpl, 'himself'=>true)); - $form->deactivate('password'); //for security - $form->deactivate('password_confirm'); - $form->setReadOnly('login'); - $rep->body->assign('MAIN', $tpl->fetch('user_edit')); - return $rep; - } - - /** - * save data of a form in a new record - */ - function saveupdate(){ - $rep = $this->getResponse('redirect'); - $id = $this->param('j_user_login'); - - if ($id != jAuth::getUserSession()->login) { - jMessage::add(jLocale::get('jacl2~errors.action.right.needed'), 'error'); - $rep = $this->getResponse('redirect'); - $rep->action = 'master_admin~default:index'; - return $rep; - } - - $form = jForms::get($this->form, $id); - $form->initFromRequest(); - - if( $form === null || $id === null){ - $rep->action = 'master_admin~default:index'; - return $rep; - } - $evresp = array(); - if($form->check() && !jEvent::notify('jauthdbAdminCheckUpdateForm', array('form'=>$form, 'himself'=>true))->inResponse('check', false, $evresp)){ - $results = $form->prepareDaoFromControls($this->dao,$id,$this->dbProfile); - extract($results, EXTR_PREFIX_ALL, "form"); - // we call jAuth instead of using jDao, to allow jAuth to do - // all process, events... - jAuth::updateUser($form_daorec); - - $form->saveAllFiles($this->uploadsDirectory); - $rep->action = 'user:index'; - jMessage::add(jLocale::get('crud.message.update.ok', $id), 'notice'); - jForms::destroy($this->form, $id); - } else { - $rep->action = 'user:editupdate'; - } - $rep->params['j_user_login'] = $id; - return $rep; - } -} - diff --git a/lib/jelix-admin-modules/jauthdb_admin/events.xml b/lib/jelix-admin-modules/jauthdb_admin/events.xml deleted file mode 100644 index 952340d27c..0000000000 --- a/lib/jelix-admin-modules/jauthdb_admin/events.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/lib/jelix-admin-modules/jauthdb_admin/forms/jelixuser.form.xml b/lib/jelix-admin-modules/jauthdb_admin/forms/jelixuser.form.xml deleted file mode 100644 index 793d972115..0000000000 --- a/lib/jelix-admin-modules/jauthdb_admin/forms/jelixuser.form.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - -