Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bro Meow 5 posts 85 karma points
    Jan 19, 2019 @ 05:14
    Bro Meow
    0

    User Management

    I'm a Umbraco Newbies. Let's say I develop Blu Ray Rental System using Umbraco, it is possible to customize Umbraco User Management and assign privilege into it?

    For sample, there is 3 Modules. Searching, Rental and Pay.

    User named James can only access for Searching only. He cannot Rent. He cannot Pay

    Please help

  • Kerri Mallinson 113 posts 497 karma points
    Jan 22, 2019 @ 12:18
    Kerri Mallinson
    0

    Hi Bro,

    Do you mean website users (called members in Umbraco) rather than Umbraco back office users?

    If so, it is possible to control members access rights by creating member groups and assigning members to groups. e.g. a group for 'allow search', a group for 'allow rent' etc. and then restrict content access or functionality depending on which groups a member belongs to.

    There is some documentation about members here: https://our.umbraco.com/documentation/Getting-Started/Data/Members/

    Hope that helps,

    Kerri

  • Bro Meow 5 posts 85 karma points
    Jan 22, 2019 @ 13:23
    Bro Meow
    0

    Hello Brother Kerri,

    Ya. Members in Umbraco. One more question,

    (1) How to get value in Umbraco Members and pass it as parameter to another page using Form Action?

    Please help

  • Kerri Mallinson 113 posts 497 karma points
    Jan 22, 2019 @ 15:11
    Kerri Mallinson
    0

    Hi, sorry I don't really understand what you mean? Do you just want to output one of the members properties on a page?

  • Bro Meow 5 posts 85 karma points
    Jan 22, 2019 @ 15:52
    Bro Meow
    0

    Hi Kerri,

    Let say Username: james
    (1) Can searching. Value in database is 23
    (2) Can do Online Purchasing. Value in database is 35

    Can Umbraco send this value=23 and value=35 into another system using Form action or QueryString or using Cookies or something else

  • Kerri Mallinson 113 posts 497 karma points
    Jan 22, 2019 @ 17:01
    Kerri Mallinson
    0

    is the value (e.g. 23 or 35) a member property?

    how do you want 'Umbraco to send this value'? is it based on an event eg when a member is created, or is it when a member does something on a page for example?

  • Bro Meow 5 posts 85 karma points
    Jan 22, 2019 @ 23:47
    Bro Meow
    0

    Question: is the value (e.g. 23 or 35) a member property?
    Answer: I just imagine. I dont know

    Question: how do you want 'Umbraco to send this value'?
    Answer: User click button in Umbraco Page created using Umbraco New Template

    When Umbraco create member and assign role, how the value looks like in database? Can you tell me?

  • Kerri Mallinson 113 posts 497 karma points
    Jan 23, 2019 @ 09:57
    Kerri Mallinson
    100

    Hi,

    I think I understand what you are trying to do, you can use the built in members/roles helpers to check the which group a member belongs to, no need to go to the database. for example, if you create a group for "Can Search" and a group for "Can Purchase" you can put this in your view (umbraco template)

                    @if (Roles.IsUserInRole(Members.CurrentUserName, "Can Search"))
                {
                    <a href="https://www.mysite.com/mypage?can-search=1">my button</a>
                }
                else if(Roles.IsUserInRole(Members.CurrentUserName, "Can Purchase"))
                {
                    <a href="https://www.mysite.com/mypage?can-purchase=1">my button</a>
                }
    

    This would be ok if all the members are either one or the other but with groups a member can be in more than one group, in this case you could append so you could have:

    <a href="https://www.mysite.com/mypage?can-search=1&can-purchase=1">my button</a>
    

    Hope that helps! Kerri

  • Bro Meow 5 posts 85 karma points
    Jan 23, 2019 @ 10:24
    Bro Meow
    0

    yeahhhhhh. TQ Kerri

  • Kerri Mallinson 113 posts 497 karma points
    Jan 23, 2019 @ 10:31
    Kerri Mallinson
    0

    no problem, If it helped, can you mark the post as the answer to show the topic as solved to help others. Thanks :)

Please Sign in or register to post replies

Write your reply to:

Draft