Child pages
  • Check User's Group in Theme
Skip to end of metadata
Go to start of metadata

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/66cefec5556c47eb#

How could I use a conditional check to display elements only for a given group, like permissions does for categories?

Something like  <inp2:m_RequireLogin  with  group_id="x" ...

Related Tasks

INP-595 - Getting issue details... STATUS

24 Comments

  1. <inp2:m_RequireLogin group="ID,ID2" next_template="..."/>

  2. thanks !

    2010/5/24 Dmitry Andrejev <dandre...@gmail.com>

  3. Sorry, my question was not very well asked, as I realize a also need to know
    if it's possible to have a conditionnal check for user group, to make
    appearing (or not) selected elements in a page, something like

    <inp2:m_if check="u_UserGroup" group="13">

    I've made different tests but... no success :s

    2010/5/24 Phil -- wbtc.fr -- <p...@wbtc.fr>

  4. Post the whole block of your template plz.

  5. Hello,

    I want to display particular fields in suggest_link.tpl, depending the
    user's group, that's why I want to check the group and display -or not- some
    of the form's fields. I'll need to apply the same system to modify_link.tpl.

    thanks
    Phil.

    PS: I tried to create a different suggest_link template, but it's not
    recognized by the system, or I don't know how to do so ^-^

    2010/5/26 Dmitry Andrejev <dandre...@gmail.com>

  6. There no such tag. But it's really easy to write one, like <inp2:m_if
    check="m_HasUserGroup" group="11">...</inp2:m_if>

  7. Thank for you answer Alex, when you say "like", it means I should adapt it?
    :$

    I have Tag *HasUserGroup* Undefined in kmaintagprocessor[Agregated
    Tag]:*HasUserGroup
    *

    2010/5/26 Alexander Obuhovich <aik.b...@gmail.com>

  8. No, I mean we could write one. We don't have one.

  9. oh, ok... well, this would help me a lot!
    It could be usefull also for other projects, don't you think so?

    2010/5/26 Alexander Obuhovich <aik.b...@gmail.com>

  10. Don't we have a similar system to manage menus displaying upon group
    permissions?

    2010/5/26 Phil -- wbtc.fr -- <p...@wbtc.fr>

  11. Group permission, yes. You could give users from that group specific
    permission and check it later on front-end.

  12. well, how to check group permission in an other way than using groud ID?
    How to make information displaying or not, depending of the user's group?

    2010/5/26 Alexander Obuhovich <aik.b...@gmail.com>

  13. You need to learn PHP then. Since there is no way to check something group
    based for now, except for existing group permissions.

    You could suggest that new m_HasGroup tag as a feature. Maybe it will even
    be placed into 5.1.0-B2.

  14. well, I suggest this feature, another good feature for big projects.

    Being able to permit to adapt members's page content according to their
    membership level, using a tag like :

    <inp2:m_if check="m_HasUserGroup" group="11">...</inp2:m_if>

    ps: Alex, I would really like to learn PHP, but... I don't have the magic
    formula to extend days ;-) it's planned for later... Actually I learn by
    myself how to use and maintain openERP, the best competitor to SAP, and may
    we should think about a module for this enterprise class ERP...)

    2010/5/26 Phil -- wbtc.fr -- <p...@wbtc.fr>

  15. Please create task then & place link to it here.

  16. sorry I forgot I can do it myself :$

    here is the task :

    INP-595 - Getting issue details... STATUS


    2010/5/27 Alexander Obuhovich <aik.b...@gmail.com>

  17. Hi Phil,

    Sorry for going back, but can you provide a good example (or better 2)
    where you'll be using this tag?

    Thanks.

    DA.

  18. Hi Dmitry,

    no problem, thanks for taking care of this request :-)

    My example is about link forms. I need to have 3 differents type of
    subscription (inportal allready handle all needed options, using groups),
    and for each type of subscription, users would be able to add more or fewer
    informations in their link record.

    Other example, it'd be usefull to display different options in user's
    account, depending on their member status. For example, toolbox would
    display more options for some users, as well as a different design, showing
    their member status (just think bout a "gold" interface for "gold" users).

    I've tried to create differents type of forms for link-add and link-modify,
    but there weren't recognized by inportal (maybe hardcoded for these
    template's call?), but even if it works, I'd need to choose which link's
    form to display in user's account.

    I hope this make sense.

    Phil.

    2010/5/31 Dmitry A. <dandre...@gmail.com>

  19. Hiding input fields on forms wouldn't prevent user from submitting those
    fields by faking POST request to the server, that creates new link. Just
    note, nothing more.

  20. thanks for this note, I'm concerned about security too :)

    I've also thought about this possibility, but all forms will be reviewed
    before being online.I've requested a feature to perform a conditionnal
    check, this way the input fields won't be hidden, but not present at all in
    the form; users would need to know the fields id and values to fake the
    post... and it's not an techies website...

    2010/5/31 Alexander Obuhovich <aik.b...@gmail.com>

  21. No problem with that. He could pay once to see how fully featured form look
    like and then emulate one using free listing.

    You should not be concerned much about it, since based on listing type only
    specific fields are shown. This way even if field is filled-in by user (that
    fake one), then it won't be shown because it doesn't belong to particular
    listing type.

    That of course depends on how you will check that later in detail template.

  22. alex, this is also a good idea, having different field names for each type
    of users :)

    Your idea on checking in template before displaying on front is good, but I
    don't know yet how to perform this :s I'd need to check the link owner's
    group, is there any tag to do this actually?

    2010/5/31 Alexander Obuhovich <aik.b...@gmail.com>

  23. No. There are no tags to perform group based checks in templates.

  24. ok, it' lead us back to the initial answer... no group checking tag yet.

    2010/5/31 Alexander Obuhovich <aik.b...@gmail.com>