Request additional open graph action properties after approval - api

Is there any way to resubmit an open graph action for further permissions after it has been accepted?
For example, trying to post a message property with the action returns the following error:
{"error":{"type":"Exception","message":"This action is not allowed to set a user message because this property was not requested for approval."}}
Can you change this or is the only solution to delete the action and re-apply?

Currently (May 2012) you need to delete and reapply, i believe there's plans to make it so you can request the three further permissions separately after approval of the initial action, but right now it can't be edited after approval

Related

How to print check to release using API

I am integrating Acumatica using REST API, I am able to create check but not able to change the check status from pending print to print.
Can anyone help me to know how to change check status to print
You cannot manually update the status value through the api (you can tell because the API does not allow you to edit an entity any differently than you can through the screen). You have to invoke the Print check action (which is not present on the default endpoint). I extended the default endpoint to include the action
Unfortunatly the api was unable to handle the redirect required exception after the report ran.
I did however, manage to print checks using the Process Payments / Print Checks through the api:
I created a new endpoint for the process payments / print checks screen
And Added an action with a parameter for payment method on the header, and the action invokes 'Process All'
It succesfully marked all checks with the payment method "CHECK" as printed

GetstreamIO Chat Moderation

I'm using Getstream.IO to implement a Livestream type chat.
I see that in the Getstream.IO docs under Default Permission Policies a moderator is able to update and delete a message.
When I set a moderator on a channel and login, though, a moderator is only able to update their own messages. I need a moderator to be able to edit and delete another user's message.
I see that in the docs for Object Ownership Getstream.IO says, "If applicable, ownership of the entity is taken into account. This parameter allows you to grant users the ability to edit their own message while denying editing others’ messages. Permission policies are organized as list ordered by priority. A permission policy has the following fields ..."
How can I list existing permission policies or create a new permission policy using the python API?
At a higher level, using the server side python API or the client side API, is there a way to make it so that Moderator roles do not have the ownership of the entity taken into account?
UPDATE -
Using client.get_channel_type("livestream") I can see that channel_moderator has ability to UpdateMessage and DeleteMessage and owner is False as I expect:
Unfortunately, that is not the behavior I see when I log in as a user where I have performed channel.add_moderators([user_id]) for that user, which shows that the changed user has is_moderator set to True, but the user has the role of user. Do I also need to add a role to the user of channel_moderator? Is this documented anywhere?
UPDATE 2:
I see that in stream-chat-react, Message.canEditMessage and Message.canDeleteMessage are determined by this.isMyMessage(message) || this.isAdmin();, so it appears that unless one overrides the Message component, the moderators need to be Admin in order to edit a message they do not own.
UPDATE 3:
I can see that in the tests for channel_permissions in stream-chat-js that a moderator is indeed supposed to be able to edit and delete a message, just as the permissions matrix in the documentation specifies. I still cannot find a way to get stream-chat-react to allow moderators to update or delete a message, however; it's not easy to understand how best to override Message.canEditMessage, since MessageList.render() automatically constructs using the default Message class.
UPDATE 4:
I was able to get a user added as a moderator to be able to edit and delete posts, but only after making that user a global admin. I have users that I want to be moderators in a channel but not have the abilities of an admin. I've cross-posted an issue to stream-chat-react: Allow Moderators to Edit and Delete Messages Without Being Admin.

Possible to create Rally TimeEntryItem for other user?

Is there a way to create a TimeEntryItem for another user?
I can persist the 'User' field before creating a new TimeEntryItem and see the User information being passed to Rally, but so far I get the following warning in the response, and the create request is treated as being for the calling user...
Warnings:["Ignored JSON element TimeEntryItem.User during processing
of this request."]
I don't think this is currently possible via the api. The warning you are getting above indicates that the User field is not writable, even on initial creation. So it is always just populated with the value of the current user making the request.

How do get userIdentity of current login request from list of all login users identities?

I want to restrict user for multiple login at a same time. Am following custom authentication method from below link
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/authentication-security/custom-authentication/
To achieve, I wanted know whether current login request is already logged in or not from some other device(session). Where or from which method am going get these details?
Please let me know how to get and return error custom message from this java file to adapter's calling method.
I don't believe any of the built-in APIs will provide what you are looking for.
Instead, I think you need to create your own implementation from scratch. Meaning, create some database to store the current status of each user. Update it every time, check the status whenever someone tries to login ...

Symfony2: log user activity

I'm new to Symfony and PHP (previously worked with C++, Java) and I can't find any solution on how to log user login and logout actions to a database. I want those specific informations:
user who took the action (via userId),
action description (login or logout),
current timestamp.
I'm looking for the simplest possible solution. I managed to successfully log information on user login by modifying function rendering user login form, but I failed miserably when it comes to logout. I know it is a terrible idea after all, but I couldn't come up with any better one. Any suggestions? Thanks in advance.
If you have a look here, it says you can define a success handler and a failure handler which you use to log stuff to your database. You can also find the handler parameters defined in the reference documentation.
Login
You would first create a service which get's the security.context and entityManager as parameters and uses both to determine which user logged in. This service is then added to the success_handler parameter and therefor called after the user logs in.
Logout
This one is more tricky I guess, as I would assume that the security.context has no information about the user anymore and you cannot use it to determine which user is logging out. You may want to look into what the handlers parameter actually is. It might be a handler which is called while processing the logout, so you could use it. Of course you might log some logouts which fail because without the success handler you cannot be sure the logout was successfull. On the other hand, maybe you can get the session id from somewhere (again, security.context maybe) and log this instead.