Required Rights of a Page
Explanation
A page that contains a script macro, that is a UI extension, or that holds anything else needing a right in order to run, is said to require that right. XWiki does not check the reader for it: it checks the last author of the content for scripts in the content and the title, and the effective metadata author for objects and their content.
That has consequences an administrator has to expect. Editing a page can start executing scripts that never ran before, when the new author has more rights than the previous one, or break the page when the new author lacks a right it needs. Changing the rights of a user, or deleting that user, moves every page they last saved along with them.
Enforcing the required rights
Rather than leaving the rights of a page to follow its last author, an administrator can declare which rights the page needs and enforce them, as described in Enforce the Required Rights of a Page. Enforcing them does two things: it denies edit right to users who do not hold the required rights, so that they cannot break the page, and it denies "Script", wiki "Admin" and "Program" right unless that right was explicitly declared. The second half is what limits the damage: a user with more rights editing the page no longer grants those rights to content that was never meant to have them, which also blocks the exploitation of some security vulnerabilities.
A page where enforcing required rights is enabled has a flag "enforceRequiredRights", if any right is enforced, it is stored in anĀ XObject of type XWiki.RequiredRightClass.
How XWiki decides which rights a page needs
Enforcing a right does not require guessing it. XWiki analyses the page and all its translations, looking at every macro and object that might need a right, and rates each finding as "Required", "Might be required", "Might be enough" or "Enough". The uncertainty is real rather than a shortcoming of the analysis: a Velocity macro certainly needs "Script" right, while whether the code inside it needs "Program" right cannot be decided without reading it. That is what the "Analysis Details" section of the review dialog is for.
When the enforced rights no longer match the content
Editing the content of a page can leave its enforced rights wrong in either direction, so XWiki keeps checking them and reports four situations: a right is definitely missing, a right might be missing, a right might no longer be needed, or a right is definitely no longer needed. Each of them is reported in the page information, to the users who may act on it: those who have edit right on the page and are either advanced users or hold "Script" right. The two messages about a missing right are shown only to users who also hold the right being suggested.
When a right is definitely missing the page is likely to be seriously broken, so a warning is also displayed above the page itself, to the users who have edit right on the page and hold the missing right.

Extensions installed without programming right
An extension that ships pages is installed on a wiki by a user holding "Admin" right on that wiki, and the installer records that user as the author of every page it writes. "Admin" also grants "Script" right, so the content of those pages that needs "Script" right runs. If the user who installed the extension doesn't also have "Program" right, content that needs it might be broken because that right can is not applied by admin right. The scripts concerned stay broken until a user who does hold the right saves those pages again, and a page that enforces its required rights reports the right as missing until then.
FAQ
Who is allowed to enforce required rights on a page?
Any user with edit right on the page who is either an advanced user or holds "Script" right.
Why does a page stop working after I delete a user?
Its scripts ran with the rights of that user as last author. When deleting a user who had "Script", "Admin" or "Program" right, the administration offers to replace the author of their pages.
An application works on the main wiki but not on a subwiki. Why?
Its pages most likely need "Program" right, which the user who installed it holds only if it was granted to them in the main wiki. "Extensions installed without programming right" says what to do about it.
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.