Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-22740

role-mapper is not working when the portlet is not in liferay-portlet.xml

    Details

      Description

      Standard example described on page http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/security-and-permissions is not working when the portlet is defined only in portlet.xml and not in liferay-portlet.xml .

      Portlet code:

      request.isUserInRole("upratovacka" )

      portlet.xml:
      <portlet>
      <portlet-name>HelloPortlet</portlet-name>
      ..... <security-role-ref>
      <role-name>upratovacka</role-name>
      </security-role-ref> ......
      </portlet>

      liferay-portlet.xml :

      <liferay-portlet-app>
      <!--
      <portlet>
      <portlet-name>HelloPortlet</portlet-name>
      </portlet>
      -->

      <role-mapper>
      <role-name>upratovacka</role-name>
      <role-link>Power User</role-link>
      </role-mapper>
      </liferay-portlet-app>

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            ra100 Rasto Rehak
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 32 weeks, 3 days ago

                Packages

                Version Package
                6.0.6 GA