Somebody has any idea how to remove members in a group by using Telegram Bot? I want to do a list with the members who will be in a group, so if someone adds another member, I'd like the Bot will be able to know if that person isn't in the list and this way remove from the group.
If you want to stop members from adding users you do not know simply just close the Add Users option in the management panel of the group and no need to remove them after joining to the group.
Related
Is there any way to add a bot (created with Azure) to an existing Skype group chat? I can create new groups with the bot but not add it to a group? I didn't submit to bot for application yet, is this really absolutely necessary?
If you use the Add bots button in the group profile you will only be able to look up published bots:
However, if you use the Add to Group button in the upper right corner (not available in the mobile client), you can find your bots that are still in preview:
Most of the following is done with the parse-dashboard so it's a bit wordy, but I understand the code just not the relationships.
I'm setting Parse.Roles and it seems like each individual Parse.Object needs to have the Role set to have access to a given Parse.Object. For example, an Object ACL needs to contain both "Admin" and "Moderator" (with respective permissions) for Admins or Moderators to have access.
Since parent and child roles are possible, it would make sense to set a Parse.Object's ACL with the "Organization" Role, which is then further modified by the child Role. So, a "Viewer" within an "Organization" cannot Write, but an "Admin" within the "Organization" can Read/Write. I've tried multiple ways of doing this - associating one user to a "Viewer" and one to an "Admin" within an "Organization" but this does not seem to work.
My Current Solution: To manually/programmatically set each Parse.Object ACL with multiple pre-set Roles. E.g. Parse Class "Person" with ACL Roles "Viewer" & "Admin".
Question: If I want to create a different Role in the future for this same Organization, will I need to loop through each Parse.Object and manually set the new Role for each of the past Objects?
It would make sense that these relationships should be managed by the parent Organization so that this doesn't need to be done manually, but this doesn't seem to work.
Any answers, thoughts, or links are appreciated.
As you have mentioned, roles can have roles and inherit the privileges of their parent role.
Hence, if the new role applies to all objects of a class or a group of them, you don't need to loop through all parse objects.
I will give you an example:
Let's say you have a class named Posts.
you have a role name viewer, and you have a role named editor.
when you create a new post object, you add both roles viewer and editor as the ACL of the post object. For instance, the viewer role can only have read access and editor may have both read and write access.
For each organization:
First you create a role name uniqueOrganizationName
Then you add all users belong to that organization to uniqueOrganizationName users (relation).
Now, in the future, if you want to add all users of that organization to for instance editorRole, instead of adding editorRole to all user objects, you can add uniqueOrganizationName to editorRole roles. Now, all users of that organization can modify all posts. If you want some users of the organization to be able to edit the post, the you add those users to editorRole users.
Note: this approach is global. so the organization editors may edit all posts objects. If you want to limit the editors of an organization to only be able to edit posts belong that that organization:
create two unique role for each organization viewUniqueOrganizationRole & editUniqueOrganizationRole.
Now, when you create a new post, depending on what organization that post belongs to, you add viewUniqueOrganizationRole && editUniqueOrganizationRole to the ACL of the post object.
After this, you can add users' to viewUniqueOrganizationRole to be able to view posts belongs to that organization or you can add users to editUniqueOrganizationRole so they can edit your post.
I hope I could answer your question. This is a complex design.
I have an existing notification feed, but I'm looking at possibly migrating over to GetStream.
Currently, I'm using Laravel Notifications, to notify users and other objects.
I currently have something like the following:
1) Users
2) Groups
3) Group Members
So, when I CRUD a group, I simply notify all members of the group and also the group ($group->notifications returns a collection), which works fine.
Looking through the GetStream docs though, it seems there is a concept of 'followers'.
Does this mean, that all members of a group need to be followers of each other to see all notifications?
What about other objects, like, retrieving a feed for a Group? Do i need another Group Type in the dashboard to save activities to?
So, If I Person A and Person B are members of Group 1, When Person A saves Group 1, I'd like Person A, to see something like:
You saved Group 1
and Person B will see:
Person A saved Group 1
When I view the Group page, I'd like to pull in the activities that have happened to that Group.
Is this possible?
Thanks
Does this mean, that all members of a group need to be followers of each other to see all notifications?
Probably not. Stream allows you setup feed groups, following relationships, and use "targeting" to send activities to different feeds.
Based on the use case you described, you're probably best off with two Feed Groups, e.g. group and user_timeline. You can give each user their own user timeline feed and set it to follow other group feeds as appropriate.
When a user does something involving the group, an activity can be added to the group feed. This activity then propagates out to all users who follow the group.
What about other objects, like, retrieving a feed for a Group? Do i need another Group Type in the dashboard to save activities to?
You can always create multiple feed groups for a given app. The example with two groups is probably sufficient for your use case but you could go further with 3 groups...
user: User events posted to this feed. This feed will handle specific and non-group specific activities. If the activity relates to a group, the "to" field can be populated with the group feed name and this will cause the activities to be copied to that feed (and in turn propagated to it's followers).
user_timeline: Retrieved by users. Follows group feeds. User's may also follow another user's user_timeline feed in order to receive all events by that user (e.g. an asymmetrical follow like Twitter / or symmetrical follow like Facebook)
group: Receives user generated activities via the 'to' targetting. System/admin generated activities may also be add directly to the feed.
Hi i have a group system and i'd like to add some security to it.
Users can belong to multiple groups and id like to know the best way to authorize people to see the groups only if they are in it. If they aren't i want to redirect them to a another page, which is different according to the group.
For now i created a service but i have to use it in every controller...
I've heard of multiple things but not sure if they are appropriate for my situation.
Thanks for your help
There are several different ways to do this depending on the approach/complexity. Here are a few:
1) Use Symfony ACLS. When a user is added to a particular group, you can use the symfony ACL system to grant them view access to that group, and then later check isGranted() against that group to see if they have view permissions.
2) Create a custom voter
http://symfony.com/doc/current/cookbook/security/voters.html#creating-a-custom-voter
3) If the number of groups is limited in number, you could even use Doctrine query filters to automatically add a where clause to all queries where the group_id is in a list of allowed groups for that user. You can bypass this for all admin users. http://doctrine-orm.readthedocs.org/en/latest/reference/filters.html
I am editing user security and am trying to give a user access to an e.List item. I select the user using the [...] button and successfully find that user by searching in our AD domain.
After I select the user and press OK, that user does not come into the CAC, just this error The filter will only accept groups and roles. Users will not be added to the filter. I don't see any filters here at all.
Have you seen this before and is it possible to set up security by users?
Thank you,
WE
Answer from ericlfg on http://www.cognoise.com/community/index.php/board,15.0.html:
Hi William,
The message you are receiving is by design. In order to add a specific user, rather than a group or role, that use needs to be a member of some kind of hierarchy in your security provider.
Ex: If you're using cognos groups and roles with a Role called "Test". You would populate this test role with members from your namespace. In the CAC, you would then select the Test group when you click on the elipsis and then that will allow you to select your individual user (or alternatively the Test role).
The same would be true if you're trying to add members directly from your 3rd party authentication provider. The individual users need to be part of a roll-up role or group in order to add that roll-up role or group to the filter. Once added to the filter you can select the individual users.
Hope this helps.