Coder Social home page Coder Social logo

ifauthex-dokuwiki-plugin's People

Contributors

5p4k avatar annda avatar chrille69 avatar splitbrain avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ifauthex-dokuwiki-plugin's Issues

Page broken if first headline is hidden

If the first headline on a page is hidden, the page layout breaks.

The following page:

<ifauth @restricted_group>
====== Hidden ======
Hidden content.
</ifauth>

====== Public ======
Not hidden content.

displays like this for users not in restricted_group:
image

Release 2020-07-29 "Hogfather"
Default dokuwiki template

option to turn off ifauthex <p> tags

Hello,

Really like ifauthex - it has allowed me to do what I need and build some navigation etc. based on groups.

I would like to use it to show or hide items in a top slot navigation menu (bootstrap/combostrap template), but
ifauthex seems to wrap output in <p> </p> tags, which breaks the layout of the top navigation bar.

Is it possible to have an option to suppress this?

Thanks.!

Compatibility after update to Release rc2-2020-06-01 "Hogfather" RC2

Hi Pietro,
the following error occured after updating.
Catchable fatal error: Argument 1 passed to AST\tokenize() must be an instance of AST\string, string given, called in C:\inetpub\wwwroot\dokuwiki\lib\plugins\ifauthex\lib\grammar.php on line 202 and defined in C:\inetpub\wwwroot\dokuwiki\lib\plugins\ifauthex\lib\tokenizer.php on line 134

I changed the following to get it running again. Perhaps you could check an patch it.
OLD
function auth_expr_parse($expr) {
return \AST\parse(\AST\tokenize($expr, auth_expr_all_tokens(), auth_expr_ignore_tokens()), auth_expr_all_elements());
}
NEW
function auth_expr_parse(AST\string $expr) {
return \AST\parse(\AST\tokenize($expr, auth_expr_all_tokens(), auth_expr_ignore_tokens()), auth_expr_all_elements());
}

ifauthex does not change TOC

Ifauthex does not change the table of contents. The chapters that ar hidden by ifauthex should not be visible for users in the table of contents.

Greeting
Christian

Plugin breaks with PHP 5

This Plugin does not work with PHP 5 on Debian 9.12

From the error log:

[Wed Sep 30 22:59:00.211143 2020] [:error] [pid 20924] [client <IP>] PHP Catchable fatal error: 
Argument 1 passed to AST\\tokenize() must be an instance of AST\\string, string given, called in
<WIKIDIR>/lib/plugins/ifauthex/lib/grammar.php on line 202 and defined in <WIKIDIR>/lib/plugins
/ifauthex/lib/tokenizer.php on line 134

Unfortunately, I had no time yet to look further into this. But I would love if this plugin could be made to work with PHP 5, as well and can probably help to get more insight into this in the next days.

Is the documentation page clear

Hi,

I've just started playing around with your plugin, and wanted to ask a clarifying questions about this comment on the module documentation page.

The content is not truly hidden, it is just not rendered (it is still visibile on the source). To truly hide use the [nodisp](https://www.dokuwiki.org/plugin:nodisp) plugin.

I'm using FireFox, and when I view the page source for a page that restricts some content using this syntax:

<ifauth @trusted_group>
sensitive stuff
</ifauth>

... I don't see the sensitive stuff in the HTML. So when you say that the hidden content is still visible in the source, I was wondering what you meant? Did you mean the page contents sent to the end user's browser, or did you instead mean the DokuWiki source that is made available through the ?do=edit action?

Sorry if, I'm being a bit dense.

Thanks
Alex

Feature suggestion: Checking permissions, rather than users/groups

I've been looking for a plugin to show/hide content based on authorisation, not just authentication, and it looks as though combining this into the ifauthex plugin might be one way to go. Essentially, I'd like to see a syntax to check whether a user has any particular permissions on a target. Examples, in a made up syntax:

<ifauth >AUTH_READ> # satisfied if the current user has a permission greater than read for the current page
<ifauth @mygroup<=AUTH_EDIT?ns> # satisfied if mygroup has less than or equal to edit permission in namespace ns
<ifuath myuser=AUTH_CREATE?.:relative:page> # satisfied if myuser has exactly create permission on .:relative:page

User/group would default to the current user if not given, and target would default to the current page if not given. These specifications could combined with the existing user/group rules to allow fine-grained showing/hiding of content based on both who they are and whether they have permission.

Being able to check the permissions on a page/namespace other than the current one would be useful to be able to show a form to create a page based on whether the user could complete the action, for instance.

Feature request - add style information

Hi, Ive just started using ifauthex. I was wondering if there might be a way to include an optional style name in the syntax so we can reflect that when required in the rendered page.

For example, the following:
<ifauth @staff style-name>This is secret stuff, only for staff</ifauth>
could be used to enclose the hidden text with a styled DIV.

Just a thought.

Thanks

Not hiding content injected using include plugin

Hi guys,

I've just switched from ifauth to ifauthex and noticed that the new plugin is not working when trying to hide content added to the page using include plugin (https://www.dokuwiki.org/plugin:include). This is a very popular plugin - could you please fix the integration of ifatuhex with it?

I also attach an example:
<ifauth !@admin>
not see this // --> this content is correctly hidden from admins
{{section>:another_ns:page#section}} // --> this content is not hidden from admins
</ ifauth>

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.