Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Alfresco One 5.x Developer???s Guide - Second Edition

You're reading from  Alfresco One 5.x Developer???s Guide - Second Edition

Product type Book
Published in Feb 2017
Publisher Packt
ISBN-13 9781787128163
Pages 528 pages
Edition 2nd Edition
Languages
Concepts
Authors (2):
Benjamin Chevallereau Benjamin Chevallereau
Profile icon Benjamin Chevallereau
Jeff Potts Jeff Potts
Profile icon Jeff Potts
View More author details

Table of Contents (17) Chapters

Alfresco One 5.x Developer’s Guide - Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. The Alfresco Platform 2. Getting Started with Alfresco 3. Working with Content Models 4. Handling Content Automatically with Actions, Behaviors, Transformers, and Extractors 5. Customizing Alfresco Share 6. Creating an Angular Application 7. Exposing Content through a RESTful API with Web Scripts 8. Advanced Workflow 9. Amazing Extensions 10. Security

Writing Java-backed web scripts


You now have a web script that returns all whitepapers, and a web script that returns the rating summary for a specific whitepaper. The next step is to implement a web script that supports the POST method so that people can submit new ratings.

Like all web scripts, the web script that creates ratings will run as the user executing the script. In this case, you are appending guest=true to the URL, but we will use the runAs property in the web script descriptor to run the code using the username admin. Another way to handle this would be to set the web script's minimum authentication level to User, give named users (or one or more groups) write access to the whitepapers folder, and make website users authenticated. But SomeCo doesn't want to set up user accounts for every user who might rate content. Any user ought to be able to rate content whether or not he or she can authenticate with Alfresco as a named user. So, we'll use the runAs option. In this example...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}