I need to turn a whole instance of askbot to "read only".
There is a configuration param or an easy way to do that?
Why I need that? I created a new instance of askbot where people will participate and put links to another askbot instance as references. I don't want people to be allowed to write in the old instance, I want them to generate content only in the new askbot instance.
Not at the moment, but a read-only mode would be a useful feature. I'm sure we'll have it at some point (I work at Askbot).
This option has been added in the mean time. It's available in the admin settings under "Access control settings"
Look for:
Make site read-only [ ]
Default value: False
Related
I am currently working on with a solution that would be able to clone/copy/backup my existing rep:policy. 'Cause when we do some jobs it accidentally removed. I am trying to apply this kind of fix, but am failing to. It says it is an invalid path.
javax.jcr.security.AccessControlException: OakAccessControl0006: Isolated policy node. Parent is not of type [rep:AccessControllable]
final Workspace ws = session.getWorkspace();
ws.copy("/etc/commerce/products/abccompany/TvPackChannelMap/rep:policy","/tmp/nxt/TvPackChannelMap/rep:policy");
Are there other ways that I can be able to take the rep:policy thru code?
You need to make sure that your job does not touch the permissions or the rep:policy, this is the best way forward for you.
The exception could be because of /etc/commerce/products/abccompany/TvPackChannelMap/rep:policy does not exist or the user whose session you are using does not have read access to the node.
Make sure the path is correct, copy paste it to your CRX/DE to make sure it exists.
I have tried to use your code to copy a rep:policy from one node to another, works fine. But I would not* recommend copying permissions that way. The best practice is to use the Access Control Management API for all things permissions.
You can check, install and use the access control tool from netcentric. It offers a jmx interface for exporting AC entries and maybe also some APIs you could use to implement your custom solution.
The Other approach is to retrieve the ACL permissions through the query language.
For example, SELECT * FROM [rep:ACL] or SELECT * FROM [rep:ACE] where [rep:principalName] is not null should give you the results.
For more information, I would recommend you to check the ACS commons ACL Packager Implementation which is available on GitHub.
Reference Link - https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/packaging/impl/ACLPackagerServletImpl.java
We are using Google Cloud SQL for our project but facing some administrative issues around it .
In our cloud DB We have two users like :
root% (any host)
root182.68.122.202
Now we need "SUPER" user access on these two users to perform some admin tasks like modifying the variable 'max_allowed_packet' to higher limit and other related stuff to optimize our functioning .
Like I want to execute one of the command :
SET GLOBAL max_allowed_packet=32*1024*1024;
But I couldn't find a way from the Google Cloud Console or from the MYSQL itself to get it done as I am getting an error prompting:
"SQL Error (1227) : Access denied ; you need (atleast one of) the SUPER privilege(s) for this operation."
I have even tried a hack to do the direct changes in the "mysql.user" table (making YES to the SUPER privilege) but all futile .
Can you please let me know how can I perform this tasks on my DB ? What is the way to grant these Super Access to the desired users .
According to Google’s Cloud SQL documentation, the root user has all privileges but SUPER and FILE. It’s a characteristic of the Google Cloud SQL.
But rest assured! You have three other ways of easily changing that global "group by" variable that has been slowing your progress. There’s a neat explanation on this Configuring database flags this will guide.
I hope this helps others!!!
Google Cloud SQL does not support SUPER privileges, which means that GRANT ALL PRIVILEGES statements will not work. As an alternative, you can use GRANT ALL ON %.*.
You can edit your running instance.
From the left menu in the SQL section :
view your instance detail by clicking on the concerned line
click on the "Edit button", in the configuration block, edit the "add database flags" add a new item by choosing in the defined list
Don't forget to save your new flag by hitting the "save" button
I'd like to use Realm with app groups to be able to share data with watch extension. I'm facing problem, that when I try to configure default realm.. By that I mean that I create new path and then I create new configuration. So far so good, but when I try to set this configuration as defaultConfiguration, nothing happens. For better idea check screenshot where is my code plus console output. Any idea? Thank you
The defaultConfiguration you set on Realm.Configuration is used to initialize new Realms. So if you would print the path of a Realm instance, e.g. try! Realm().path, then this would reflect the path from the shared app group. You did instead initialize a new & fresh configuration, which always uses the initial default values.
I am writing a chat program that has a bunch of clients connect to it and populate themselfs to a listview, I want to be able to click on each individual client and open up a form that looks like a chat, but I want to be able to do it to multiple clients at the same time.
I have made Form2 (the chat window) clone itself for every instance, however I need to know how to lock on to the cloned form to make changes such as Form2.RichEdit.Lines.Add
However when I try to do this it does not work because I'm not locking on to the right form since it is cloned I am assuming it is no longer Form2
Any info on this would be highly appreciated.
Update
I am going to go ahead a reword what I am trying to do.
I will explain what im trying to do: I have a chat program (server) that is listening for clients to connect via Indy10 sockets When the client connects it populates the ListView with the user name and when I click on the user name (the server) opens privatemessageform where I can chat with the client.
I want to be able to have multiple clients connected and I want to be able to click on as many as I want and have it clone the privatemessageform and have 2 separate chat windows to 2 separate clients
The problem is: When trying to click on the seccond user the program gets confused and cannot lock on to that seccond user's privatemessageform (clone).
And if any more info is needed and I mean anything at all please do not hesitate to ask I will be on for several hours and constantly checking this thread.
I've been stuck on this for 3 days so I would really love to get this resolved and move forward with my project. Any information is highly appreciated. Thanks in advance!
Open Project Options and remove Form2 from auto-creation list. Do not use that variable any more.
Rename TForm2 to some meaningful name. Once you would have ~10 forms in your program you would forget what you meant by numbers 2, 5, 7 ...
ALWAYS give variables meaningful names, that includes components, that includes forms. Here i will name TForm2 a TPrivMessageForm
Use a special array of variables to keep several forms, not a single global variable. For example like that:
Type TChatUser = string;
// to begin with, user is a name. Then it may become URL, or GUID or something
// complex like `record` or `class` or whatever
Type TPMForms = TDictionary<TChatUser, TPrivMessageForm>;
PMForms := TPMForms.Create;
Creating new private message window after clicked on user:
if not PMForms.ContainsKey(ClickedUser)
then PMForms.Add(ClickedUser, TPrivMessageForm.Create(Application) );
PMForms[ClickedUser].ChatWith := ClickedUser; // variable in ex-TForm2 to tell several instances apart
When such form is closed - it should via its OnClose
Remove itself from PMForms list (so no dangling pointers would remain)
chose caRelease for closing actions (making VCL actually free the form object)
See Also
http://delphi.about.com/od/beginners/a/using-t-dictionary-hash-tables-in-delphi.htm
http://docwiki.embarcadero.com/CodeExamples/XE4/en/Generics_Collections_TDictionary_(Delphi)
PS. Edit your question please and add TAG with your specific Delphi version.
PPS. download ready-made FLOSS chat programs and just read and learn how they do it. Maybe instead of opening a free-floating (cluttering desktop) form you'd better open Tab in PageControl. "Use the Source, Luke"
https://sourceforge.net/p/dreamchat/wiki/Home/
https://sourceforge.net/p/achat/wiki/Home/
http://www.visualirc.net/features.php
For the latter to find the sources one has to type two words "Visual IRC" at www.google.com and get http://sourceforge.net/p/visualirc/mercurial/ci/default/tree/ - this crucial information i did omitted in fair belief that a person interested in finding sources would be able to do it on his own.
PPPS. Those is not "cloned": cloned are separated objects. What you talk is several instances of the same form class. Like you may have two or more labels on the form, you can have two or more forms in your application.
In our project we would like to have a workflow which checks whether all three signatures (implemented through booleans) have been added to an object of type "Project" before it continues to the next state.
Unfortunately this doesn't seem to be possible while editing the workflow through the web and we haven't been able to find it in the documentation either.
How would we do it?
Thank you very much for any assistance.
Use the transition Guard expression to check for this:
python: here.getFirstBoolean() and here.getSecondBoolean() and here.getThirdBoolean()
This can be access through the ZMI:
append /manage onto site root
go to "portal_workflow"
click the "contents" tab
click on the workflow you're using
click the transitions
you should see the area for a guard expression
You could put the login into a Script in the custom folder also if you wanted to make it easier and do it all TTW.