How to get actions from Meteor accounts package - meteor

Acutally I'm trying to know when the user click on the Log Out button that is create with Meteor Accounts package (see the picture) because I need to destroy some session's variables when he log out.
I think you have already seeing this graphical unit
Thank you for the help
EDIT: (thank you #Khang ) check this link for the solution https://github.com/gwendall/meteor-accounts-helpers

I see that all you want is to know when a user has logged out. Then you could simple use Accounts.onLogout to register a callback for logout event.

Related

Create a calendar folder to a specific user under a specific domain

I'm trying to create a calendar to be shown in the list of calendars in a specefic user.
For example this calendar folder have the name Sample like presented by that capture:
That done with success under a the service account.
Could you please tell me how can I do it with a specific user ?.
Could you help me. Big thanks.
Take a look to those threads https://developers.google.com/calendar/v3/reference/calendars/insert and https://developers.google.com/calendar/v3/reference/acl/insert.
HTH

Unable to create support case

Initially, I had created a case to report a problem with credentials assignment to Cloudant. But, after a few iterations with support, I am no longer able to view my own case via the link I get in the support e-mail.
I only get a message You do not have the right permissions to view cases.
So, I try to open a new case - but then I get You do not have the right permissions to open cases and a description telling me what to do.
Following the steps (Creating an access group for working with cases), I'm able to follow the first steps (From the menu bar, go to Manage > Access (IAM), select Access groups, and click Create), but at the Access Groups page, there is no Create button or any way to create a new access group.
So, I'm not even able to ask for support any more...
You can always open support cases via email to support#cloudant.com - if you provide your Cloudant account name (the one that ends with -bluemix) it’s easier for support to locate you.
You still have a -bluemix account - look at the URL when opening the Cloudant dashboard. Here’s an instance I just created using my internal IBM creds...
https://5217efab-4dcf-4ea0-a1c7-a0ea017a8ccd-bluemix.cloudant.com

How do I know with telegram bot if a user has changed telegram profile photo?

How can I get a picture when the telegram user changes his main photo? Can I get this without cron?
I assume that you know getUserProfilePhotos method.
You can't get notified when users changed their profile photo, so you need to track it, like using cronjob.
You can use getUserProfilePhotos feature and save the last profile picture in a database. Then by checking the last profile picture in specific time periods (for example every 30 seconds) you can check whether the picture is changed or not. And if it was changed you can notify yourself.

Train of thought with submit data Meteor JS

My question is very specific and not for all, I want people to help me with my train of thought.
What I want to build : for example I have service where all people (not logined) can create they post with some data like news and publish it for money.
How I think it should be built (in 2 steps):
Man click on the link to page with form that create posts and router go to this page
He fills data and click submit
Server checked form and if all OK, session.set this data that he fills and route to the next step (pay money
to publish they post)
(I want to build this with stripe so) He clicked on stripe checkout button and pay some $$, if he paid then show message, all ok, we session.get data that he fills from previous step, and on server we insert his post and go it, if not show message that something wrong
Technical Plan session.set session.get, it is right ?
And if someone slip through form with fills and go to payment page, how to check it ? If session.get === undefind or something like this, reroute to previous step ?
As you can see I have a lot of questions, and I cant find answers in google or some documentation tutorials and etc. maybe some have answers to it
Your question is very wide. Consider narrowing it.
Your 2 first points make sense. It's ok. The third and forth are wrong.
Technical Plan session.set session.get, it is right ?
No it is not. You plan to use the information you hold in a Session variable to publish data validated on client side. It does not ensure the validity of your data. This is a bad idea because anyone can open the console and edit the data to make it different/invalid regarding your rules of validation. All it takes is a Session.set ("yourData", "YouHaveBeenHacked");
What you need is to call a Meteor method on server side to add an entry to a dedicated collection. You add another field (e.g; status) to keep track of the post payment and publication and return the data entry _id that you store in a Session variable.
This way, your method can return an error if the data does not fit into your requirements.
Side note: you also need to add a CRON job serverside to get rid of all the old post tentatives that have not been paid for (user left his browser, he closed tab, etc.).

Is there a Plone 4 Users and Groups audit trail?

I have successfully created a Plone 4 (Plone 4.0.7) Group whose sole purpose is to manage users.
Ideally we'd like an audit trail of who creates/changes users/groups on the site. Is there any existing functionality available to do this, if not would it be a difficult thing to put in place?
This functionality is not available in Plone by default. You have to register your subscribers for proper events.
The events already available are:
IPrincipalCreatedEvent: A new principal (user) has been created
IPrincipalDeletedEvent: A user has been removed.
ICredentialsUpdatedEvent: A principal (user) has changed his/her password
(Products/PluggableAuthService/interfaces/events.py)
There's not an event raised during roles changes. You have to create your own event for that and then raise it somewhere (a good point could be plone.app.controlpanel.usergroups.py#L319. You'll need to override this browserview)
There is a new product called collective.AuditLog that can partially answer this.
As Giacomo said earlier there is not an event raised during roles changes. However, you could use AuditLog to track when users are Added, Removed, and even when they log in and log out if you wanted. These are all done using Content Rule triggers.
And if you created your own event for roles changes, you could use that as a content rule trigger for AuditLog as well.
A little late, but hopefully this will help someone who stumbles across this question.

Resources