Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Secuty role setup for portal users?

Posted on by

Hello,

I have created a web page called 'Create new order' and 3 web roles:

admin, authorized user, anonymous user (as default).

What I want to achieve is: block the page for anonymous users, accessable for authorized user, and allow front-end publishing including editting chile page, web contents..... for admin.

I have set up 2 web page access rules,

1. 'Restrict access for creating new order' which sets 'restrict read' and attached anonymous user web role on it,

2. 'Allow access to authorized user' where sets 'grant changes' and attached authorized user web role on it.

In the 'create new order' template I set up a secutiry control like this:

  {% assign is_admin = user | role: 'admin' %}
  {% if is_admin %}
  User is admin   
  {% include 'entity_list' key: 'A List for admin' %}  
  {% else %}     
  User is not admin 
  {% include 'entity_list' key: 'B List for end users' %}     
  {% endif %}

Though when I look at the portal and login as authorized user, I see it work out as an admin where it can do all front-end edit and webpage shows up B list,

so I think the system recognize it as an admin.

Is there anything I am missing as I'm very new to web security control on portal?

Thank you very much,

Best Regards,

*This post is locked for comments

  • Suggested answer
    RE: Secuty role setup for portal users?

    Hi,

    I think there is some problem on your template itself. you might have missed some check for admin user.

  • ChienIM Profile Picture
    ChienIM on at
    RE: Secuty role setup for portal users?

    Hello,

    I've checked it and it was only given authorized role while when I go to other page e.x. Home page,

    user with admin role is able to edit front-end while the user with authorized role is not.

    Thus I think maybe the problem is at my template or access role for page where I have already inactive all the rules on NewOrder page, so is a bit stucked here...

  • Suggested answer
    RE: Secuty role setup for portal users?

    Hi

    Check is that user(Contact) through which you have logging in to the portal has given a admin web role.

    Just give only authorized web role to that contact.

    Mark it as Answered If it helps you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans