Add "readOnly"-endpoint parameter to repo-config endpoint
The repo-config endpoint allows plugins to add new config sections to the repository configuration. So far, each plugin had to determine itself, whether the options were changeable by the logged in user. Thus, each plugin that wanted to disable form fields, if the user was not the owner of the repo, had to perform the same REST-request, which led to an unnecessarily high number of requests. This change adds a parameter to the repo-config endpoint, which forwards the boolean _readOnly variable to the plugin to be used to decide, whether an option should be enabled to the logged in user. Change-Id: Id1d7db2184d84d4ded157bed9a0492f516eeb53e
This commit is contained in:
@@ -353,6 +353,7 @@ limitations under the License.
|
||||
</fieldset>
|
||||
<gr-endpoint-decorator name="repo-config">
|
||||
<gr-endpoint-param name="repoName" value="[[repo]]"></gr-endpoint-param>
|
||||
<gr-endpoint-param name="readOnly" value="[[_readOnly]]"></gr-endpoint-param>
|
||||
</gr-endpoint-decorator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user