Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content rules configuration - ".olicontent" file #10

Open
matiboux opened this issue Mar 25, 2017 · 2 comments
Open

Content rules configuration - ".olicontent" file #10

matiboux opened this issue Mar 25, 2017 · 2 comments
Assignees
Labels
feature Specific features updates and suggestions

Comments

@matiboux
Copy link
Owner

matiboux commented Mar 25, 2017

Like the index file name config (#6) previously added to the framework, why not support something such as a .olicontent file?

This new file would contains all content rules of the current content directory and sub-directories.
When rules are not specified in a content directory, Oli should use either the parent directory rules (for a sub-directory), the website configuration or the framework default settings, in that specific order.

All rules:

  • Index: "{filename}" – e.g. Index: "index.php"
  • Error: {http-code} "{filename}" – e.g. Error: 404 "404.php"
  • Access: [{files}] DENY/ALLOW * or Access: [{files}] DENY/ALLOW [from {right}] [to {right}]
    The {files} parameter is an encoded json array.
    The {rights} parameters are included to the range.
    • e.g. Access: DENY * or Access: DENY to VIP (VIP also denied)
    • e.g. Access: ALLOW * or Access: ALLOW from USER (USER also allowed)
    • e.g. Access: ["login.php"] ALLOW *

Also, some new config should be added for default errors file handlers.

@matiboux matiboux changed the title Content rules ".oliaccess"f ile Content rules configuration - ".olicontent" file Mar 25, 2017
@matiboux matiboux added feature Specific features updates and suggestions standby It's there, but on standby labels Mar 25, 2017
@matiboux matiboux self-assigned this Mar 25, 2017
@matiboux matiboux removed the standby It's there, but on standby label Mar 25, 2017
matiboux added a commit that referenced this issue Mar 25, 2017
Added support for a different 404 error file
Minor edits in OliCore:setupMySQL()

→ Issue #10 development step
matiboux added a commit that referenced this issue Mar 25, 2017
Added support for a different 404 error file
Minor edits in OliCore:setupMySQL()

→ Issue #10 development step
matiboux added a commit that referenced this issue Mar 25, 2017
→ Issue #10 development step
matiboux added a commit that referenced this issue Mar 26, 2017
→ Issue #10 development step
matiboux added a commit that referenced this issue Mar 26, 2017
Edits on OliCore::loadContent()
  → Unfinished 403 error handler
Added $pathTo parameter to OliCore::decodeContentRules()
Added OliCore::fileAccessAllowed() function
Minor edits on OliCore::getUserRightLevel()
OliCore::getRightLevel() is now deprecated,
  use directly OliCore::translateUserRight() instead

→ Issue #10 development step
matiboux added a commit that referenced this issue Mar 27, 2017
→ Issue #10 development step
matiboux added a commit that referenced this issue Mar 27, 2017
→ Issue #10 development step
@matiboux
Copy link
Owner Author

matiboux commented Apr 6, 2017

I stopped mentioning the issue in my commits,
but I'm still working on the feature when it's going okay.
Everything seems to be supported, I'm just troubleshooting and fixing bugs.

matiboux added a commit that referenced this issue Apr 8, 2017
@matiboux
Copy link
Owner Author

matiboux commented Apr 8, 2017

Update: Everything is not supported.
Yet, only the global .olicontent file is supported.
Adding support for secondary .olicontent files (in sub-directories) might be considered.

@matiboux matiboux mentioned this issue Jul 27, 2018
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Specific features updates and suggestions
Projects
None yet
Development

No branches or pull requests

1 participant