Is it achievable to :
limit the ability for the user editing a page to add my webpart
which has already been added ("disabling" it somehow from the
webpart library, or catching the user drag-n-drop action and
displaying an error message)
if not, making duplicated instances of
a webpart fallback to a specific behaviour if they detect they
another instance is already running (using some kind of shared
variable / singleton that I can leverage as an instance counter each
new instance would increase by 1 for instance)
Thanks in advance for any insight
Related
I am totally new to Sharepoint development (Sharepoint 2013), and could use some help.
I inherited a console application where I'm getting this message below:
Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes.
Actually, within the application and another console application (both running as jobs), there are numerous using blocks where they are newing up SPSite and SPWeb, opening the same list, and looping through the entries and posting update. These loop are incredibly slow. So the SPSite and SPWeb stays open for a long time, while additional SPSite/SPWeb are new'ed up to the same list.
Should I new up only one SPSite and SPWeb per application and use them globally within the application? Should I grab my list objects and assign them to a .NET List and close out the SPSite/SPWeb and then when I'm ready to update the record to temporarily new up a SPSite/SPWeb for the duration of the Update()? These list items are being updated by the other job as well while marching thru the list and posting updates to the same list. Is that an issue?
In reality, the notion of a Error Log list exists as well. Items are constantly being appended to this list. Would that cause that error message above?
Would create a Retry loop for the Update() work? Or is the issue of the list item updated by another process prevent a successful update?
Thanks.
I'm using Blueprism and I have to create a robot for a web application. So far I've had all of my subpages spied in one object, but now I must split that object into 5 different objects, each object for one subpage for example :
Now I got this : Web App - Object and I must split it into
Web App - Login Page
Web App - Main Page
Web App - Settings Page etc.
Everything worked when I had just one object but now it's not.
I spied elements again for my new objects in my application modeler.
Also I tried the "Sharable option" and of course published all of my pages.
For example my Web App - Main Page action cannot be used by my Settings Page. I can choose it from the list but then I get this error :
Internal : Failed To perform Step 1 In Navigate Stage 'Click' on page 'click' - Not Connected
What should I do and what should I write in application modeler when I'm asked for the URL of my start page? I've tried the main url for example web.com, my subpages url : web.com/main and also I tried to leave it blank.
Please help me to solve this problem
When splitting your functionality across multiple objects, it's important to note how Blue Prism handles connections ("attachments") to individual applications.
When a Business Object is leveraged to Launch a business application, the attachment to the application itself is (normally) handled in the background by Blue Prism. When another business object is created, the attachment isn't handed off to the secondary object(s). This is clearly laid out in the Blue Prism Object Design Guide document, section "4.2.4. Attaching":
An object must be attached to the application before it can be used
to automate it. When an object launches an application, it is
automatically attached to that application. Therefore, the ‘Basic
Actions’ object does not require an ‘Attach’ action. The remaining
objects that wish to work with an application that is already launch
must first attach to the application.
The solution to this object design paradigm is to include a non-published "Attach" function in each of the secondary objects that's called at the start of each of the secondary object's actions. From the aforementioned guide:
If an object attempts to attach to an application when it is already
attached, an error will result. Therefore, when building an ‘Attach’
action, it is best practice to first detect if the object is already
attached to the application. A typical ‘Attach’ action may look like
this
By using the approach above, every other action within the object can call the ‘Attach’ page as is its first stage to
ensure the action is ready to work with the application e.g.
If you are already launched the application then no need to keep url to rest of the Objects , just in application modeler u check the checkbox for application is already running, after that in each and every page attach the application and in the attach page keep the web page(all the navigating pages) names in the collection and passing it as a webtitle parameter to the attach stage
This works fine.
I need to have a button in custom Location app, upon clicking which will take me to workorder application list tab with all the workorders created on the assets of the particular location.
I am using launch in context.
I tried using WF, but the workorder is opening in main tab instead of List tab.
Work flow used
Interaction Node details
after routing, wotrack is opening like "http://hostname/maximo/ui/?event=loadapp&value=wotrack&additionalevent=changetab&additionaleventvalue=List&uniqueid=72&uisessionid=35&_tt=6e2h84jnc2qpnu9tohvo04qpdp"
how it is fetching workorder with unique id 72?
I think Launch in Context is the wrong tool. Launch in Context is used for launching the user from Maximo into some external website / application, using some data from Maximo to provide some context to that application.
Instead, it sounds to me like you should use a Workflow process with an Interaction Node. In the Interaction Node, you can specify the Application and tab to take the user to and the Relationship from the Main Object of the current app to use to find the record(s) that should be loaded in the destination app for the user.
I don't remember how to set up Launch in Context, but this web page on the URL parameters you can use should help on that part at least.
http://maximodev.blogspot.com/2012/04/maximo-urls.html
Specifically, the example using the SQL query is probably what you need, since you want to display the records (workorders) associated with the records (assets) associated with the record (location) you have. (The earlier outline of the article has the wrong URL values for the "Perform a query using a where clause" section, but the example near the bottom has the correct setup.)
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=sqlwhere&additionaleventvalue=status%20in%20('WAPPR')
I think if you give the Launch in Context the part of that URL after the hostname, it will try to load it as a page at the current, which would end up taking you to exactly where you want to be, regardless of the public hostname of the server.
maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=sqlwhere&additionaleventvalue=status%20in%20('WAPPR')
before write the question sorry for my english. My question is this:
I have an web application in jsf, the application have new, edit and delete Categories, outgoings, Budgets, users, etc.
When open the edit page i have the url like this:
http://localhost:8080/Practica3/faces/usuarios/edit.xhtml?id=2
the problem is if the user change the number 2 for another number, and the another number exists in the dababase, the page change the data of the id 2 to the data of the new id.
The problem is if the id number X is of a data of another user, and the user that change the id is not in conditions to see that data.
How disable the edit of the id, or denied to show the data to the another user?
Thanks, and i hope have a response.
Just check in service layer if the current user is allowed to edit the requested entity. If not, then throw some security exception for which you could if necessary configure a custom error page in web.xml.
The technical problem has nothing to do with HTTP/JSF. If you "fix" it alone in JSF side, then you still have a gaping security hole in service layer which would affect any other frontend using it. The frontend is not responsible for business restrictions in service layer itself.
The problem is not stopping the editing of the ID. That is on the client side/browser and you cannot stop this value from being edited.
You need to implement propery Access Security Controls. When you get any response back, you need to check if the user can perform the action they specified (read, update, delete, etc.) as well as checking to make sure they have permission to the data they want to perform the action on.
These two topics are on the OWASP Top 10:
A4-Insecure Direct Object References
A7-Missing Function Level Access Control
The pages will tell you what the problem is, mitigation stragegies, and different ways of testing for that in your application.
I would also become familiar with the other Top 10 categories (this is not an all inclusive list but a good starting point).
I have created a SharePoint web part which has custom properties that the user can configure. However these apply only to that instance of the web part. How could I provide the user a place to allow the user to set properties that would apply to every instance of the web part?
(I'm new to SharePoint development and am using WSPBuilder to create a web part with a feature and deploy it.)
You could use the Property bag of the SPSite's RootWeb (or, to make it SPWeb specific, the current SPWeb) to store global settings for that webpart (in that specific site collection). Create a LAYOUTS page to allowing editing of these settings if it's site collection wide, use RunWithElevatedPrivileges to store properties in an SPWeb's property bag.
Try a static member, eg:
[WebBrowsable(false), Personalizable(PersonalizationScope.Shared)]
public string configSetting
{
get { return _configSetting; }
set { _configSetting = value; }
}
private static string _configSetting;
It has been a bit since I used SharePoint... the first thing I would try is to create a List whose records are the parameters you want to feed to the webpart, and configure it so that the users can only see/modify their own record.
Caveats: this may be tricky if you want to make records dynamically appear whenever a new user registers. And also, lists are "local" to the site, so you can't have a single list which is seen from parts in different sites. (Or at least this is how it worked in SP 2007).
Depending on the number of parameters you need to properly configure the webpart you could also play around with custom "fields" in the user profile, but this is not very robust and would probably be an overkill.