Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:28:15+00:00 2026-06-10T22:28:15+00:00

I want to customize Surf Platform Root-Scoped API specifically user object. That means add

  • 0

I want to customize Surf Platform Root-Scoped API specifically user object. That means add new property or method to user object to check the user is in certain group in header.inc.ftl [in share] like `<#if user.isAdmin>

  1. How can I implement this?
  2. Is Alfresco Root Scoped Objects can be used as Surf Platform Root-Scoped object?

I have no idea of customizing surf platform root object. Can anyone help me???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:28:17+00:00Added an answer on June 10, 2026 at 10:28 pm

    Not quite sure what you are trying to accomplish, but the role security model is hardcoded in spring-surf/spring webscripts. There is guest, user and admin. If what you want is another analogous role you’ll have to hack the spring-surf libaries, namely:

    org/springframework/extensions/surf/mvc/PageView.java
    org/springframework/extensions/webscripts/ScriptUser.java
    org/springframework/extensions/webscripts/Description.java
    org/springframework/extensions/webscripts/connector/User.java
    

    This is what I had to do to implement user.isEmployee. This approach allows you to literally treat your new role just as the others.

    you can use

    <authentication>employee</authentication>
    

    in page descriptors or

    <item type="link" permission="employee" id="people">/people-finder</item>
    

    on the navigation.

    Just checking whether the user is in a certain group in a certain webscript is a whole diffrent story and does not provide the same functionality.

    If what you want is the latter, you should make a call to

    /alfresco/service/api/groups/{shortName}
    

    miss
    and works through the response.

    Update: The item permission attribute requires a little more tweaking.
    In header.get.js, propagate the new role to it gets processed properly in header.inc.ftl:

    model.permissions =
    {
        guest: user.isGuest,
        admin: user.isAdmin,
        employee : user.isEmployee
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to customize a .NET build process so that I can run an
I want to customize std::vector class in order to use an OpenGL buffer object
I want to customize a object's behavior before the object is created. I think
I want to customize Textselection dialog of webview.(When we press longclick at that time
HI, I want to customize the WMD editor (or wmd-new ) to convert TeX
I want to customize the About dialog box that OSX displays for my Swing
I want to customize my search keyboard in a way that if no input
I want to customize my ExpandableList. My issue is that I need a button
I want to customize key pad so that ,it should not cover the tabbat
Suppose that I want to customize the indentation rules of the foton document editor,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.