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 8411479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:25:55+00:00 2026-06-10T00:25:55+00:00

I developed a data extender class that acts on GetItem and CheckOutItem commands to

  • 0

I developed a data extender class that acts on GetItem and CheckOutItem commands to do some business-specific validation to determine whether the user should have access to modify the item or not (basically if it’s past the initial “author” task in workflow, no one can edit it. by default Tridion allows “reviewers” in workflow to edit the item, which is a no-no in our business).

I am relatively certain this worked at one point, but now does not. I’m exploring what might have changed, but I thought I’d ask here in case anyone has an idea.

If the item can’t be modified, I’m setting the IsEditable attribute to false. This does in fact disable the Save and Close button and Save and New button, but for some reason the Save button is enabled. I don’t quite understand why there could be a difference. (I’m looking to see if someone extended the save button somehow, but I don’t see that being done). Any thoughts on how the Save button would enable when the others aren’t?

thanks for any suggestions,

~Warner

public override XmlTextReader ProcessResponse(XmlTextReader reader, PipelineContext context)
{
    using (new Tridion.Logging.Tracer())
    {
        string command = context.Parameters["command"].ToString();
        if (command == CHECKOUT_COMMAND || command == GETITEM_COMMAND)
        {
            XmlDocument xmlDoc = ExtenderUtil.GetExtenderAsXmlDocument(reader);
            XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
            nsmgr.AddNamespace("tcm", Constants.TcmNamespace);
            try
            {
                //is this a page or component?
                XmlNode thisItemNode = null;
                thisItemNode = xmlDoc.SelectSingleNode("//tcm:Component", nsmgr) ?? xmlDoc.SelectSingleNode("//tcm:Page", nsmgr);
                if (thisItemNode == null) return ExtenderUtil.GetExtenderAsXmlTextReader(xmlDoc);
                // need to impersonate system admin in order to get workflow version of item later
                Session sessionSystemAdmin = Util.SystemAdminSession;
                XmlAttribute idAttribute = thisItemNode.Attributes.GetNamedItem("ID") as XmlAttribute;
                //if ID attribute is null, we don't have the actual object being used (just a referenced item. so, we'll ignore it)
                if (idAttribute != null)
                {
                    string itemId = idAttribute.Value;
                    VersionedItem tridionObject = Util.ObtainValidTridionIdentifiableObject(sessionSystemAdmin, itemId) as VersionedItem;
                    //logic has been moved to separate method, just for maintainablility...
                    //the logic may change when workflow code is finished.
                    bool allowSave = IsItemValidForEdit(tridionObject, nsmgr);
                    if (!allowSave)
                    {
                        //not the WIP ("author") task... make item read-only
                        Logger.WriteVerbose("setting iseditable to false for item: " + itemId);
                        XmlAttribute isEditableAttribute = thisItemNode.Attributes.GetNamedItem("IsEditable") as XmlAttribute;
                        isEditableAttribute.Value = "false";
                    }
                }
            }
            catch (Exception e)
            {
                Logger.WriteError("problem with get item data extender", ErrorCode.CMS_DATAEXTENDER_GETITEM_FAILURE, e);
            }
            return ExtenderUtil.GetExtenderAsXmlTextReader(xmlDoc);
        }
        else
        {
            return reader;
        }
    }
}
  • 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-10T00:25:56+00:00Added an answer on June 10, 2026 at 12:25 am

    The solution is to really look over the entire solution and be absolutely positive that nobody snuck something in recently that messes with the Save button and is magically enabling it behind the scenes. I’ve re-edited the code to show how I initially had it. And it does work. It will disable the save, save/close, save/new buttons and make all fields disabled. I’m sorry that I wasted Frank’s time. Hopefully having this here for historical purposes may come in handy for someone else with similar requirements in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a python C-extension that receives data from python and compute some
I developed a simple .net application that scrapes some data from web and saves
I have developed a GUI that is used to extract some data from a
I developed a firefox plugin that store some data in plugin folder. How can
I've developed an application that populates a treeview from hierachical data in a database.
i've developed an android app that's fetches an xml file and displays this data
I've developed a windows form application. However,I want to upload data from that application
I developed a web app that responds with data in the format as specified
I have developed a simple app that contains a UITableView that displays data, and
I have developed an iPhone application that fetches data from internet. I want to

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.