Method to update object group permissions general

        :param ogpgs: List containing object group permissions general desired to updated
        :return: None
541022
def update(self, ogpgs):
        

        data = {'ogpgs': ogpgs}
        ogpgs_ids = [str(ogpg.get('id')) for ogpg in ogpgs]

        return super(ApiObjectGroupPermissionGeneral, self).put('api/v3/object-group-perm-general/%s/' %
                                                                ';'.join(ogpgs_ids), data)
844650
def _get_group_cached_perms(self):
        
        if not self.group:
            return {}
        perms = Permission.objects.filter(
            group=self.group,
        )
        group_permissions = {}
        for perm in perms:
            group_permissions[(
                perm.object_id,
                perm.content_type_id,
                perm.codename,
                perm.approved,
            )] = True
        return group_permissions
799679
def update_command(permissions, rule_id, endpoint_id):
    
    client = get_client()

    rule_data = assemble_generic_doc("access", permissions=permissions)
    res = client.update_endpoint_acl_rule(endpoint_id, rule_id, rule_data)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
25839
def cli(ctx, group, organism_name, administrate=False, write=False, read=False, export=False):
    
    return ctx.gi.groups.update_organism_permissions(group, organism_name, administrate=administrate, write=write, read=read, export=export)
812361
def permissions_update(principal_id, permission_id)
      response = service.permissions_update(
        acl_id: self.id,
        principal_id: principal_id,
        permission_id: permission_id
      )

      response.at_xpath('//status').attr('code') == 'ok'
    end
1291562
def update_membership(self, group_id, users=[]):
        
        data = {
            'groupId': group_id,
            'users': users,
        }
        return _fix_group(self.post('updateMembership', data))
1341574
def update(self, permission):
        
        data = values.of({'Permission': serialize.map(permission, lambda e: e), })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return RoleInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
620920
function updateGroup(oContext) {
			var oNewGroup = oBinding.getGroup(oContext);
			if (oNewGroup.key !== sGroup) {
				var oGroupHeader;
				//If factory is defined use it
				if (oBindingInfo.groupHeaderFactory) {
					oGroupHeader = oBindingInfo.groupHeaderFactory(oNewGroup);
				}
				that[sGroupFunction](oNewGroup, oGroupHeader);
				sGroup = oNewGroup.key;
			}
		}
1361254
public void updateGroupDetails(GroupForm groupForm, IPerson updater) {

        if (!canEditGroup(updater, groupForm.getKey())) {
            throw new RuntimeAuthorizationException(
                    updater, IPermission.EDIT_GROUP_ACTIVITY, groupForm.getKey());
        }

        if (log.isDebugEnabled()) {
            log.debug("Updating group for group form [" + groupForm.toString() + "]");
        }

        // find the current version of this group entity
        IEntityGroup group = GroupService.findGroup(groupForm.getKey());
        group.setName(groupForm.getName());
        group.setDescription(groupForm.getDescription());

        // save the group, updating both its basic information and group
        // membership
        group.update();
    }
535168
def create_api_object_group_permission(self):
        """"""

        return ApiObjectGroupPermission(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
408478
def _UpdateSudoer(self, user, sudoer=False):
    
    if sudoer:
      self.logger.info('Adding user %s to the Google sudoers group.', user)
      command = self.gpasswd_add_cmd.format(
          user=user, group=self.google_sudoers_group)
    else:
      self.logger.info('Removing user %s from the Google sudoers group.', user)
      command = self.gpasswd_remove_cmd.format(
          user=user, group=self.google_sudoers_group)

    try:
      subprocess.check_call(command.split(' '))
    except subprocess.CalledProcessError as e:
      self.logger.warning('Could not update user %s. %s.', user, str(e))
      return False
    else:
      self.logger.debug('Removed user %s from the Google sudoers group.', user)
      return True
741005
def rectify_pgroups(self):
        
        # add any parameters groups
        pdata_groups = list(self.parameter_data.loc[:,"pargp"].\
            value_counts().keys())
        #print(pdata_groups)
        need_groups = []
        existing_groups = list(self.parameter_groups.pargpnme)
        for pg in pdata_groups:
            if pg not in existing_groups:
                need_groups.append(pg)
        if len(need_groups) > 0:
            #print(need_groups)
            defaults = copy.copy(pst_utils.pst_config["pargp_defaults"])
            for grp in need_groups:
                defaults["pargpnme"] = grp
                self.parameter_groups = \
                    self.parameter_groups.append(defaults,ignore_index=True)

        # now drop any left over groups that aren't needed
        for gp in self.parameter_groups.loc[:,"pargpnme"]:
            if gp in pdata_groups and gp not in need_groups:
                need_groups.append(gp)
        self.parameter_groups.index = self.parameter_groups.pargpnme
        self.parameter_groups = self.parameter_groups.loc[need_groups,:]
517066
def update(self, request, pk=None, parent_lookup_organization=None):
        ''''''
        user = get_object_or_404(User, pk=pk)
        org = get_object_or_404(
            SeedOrganization, pk=parent_lookup_organization)
        self.check_object_permissions(request, org)
        org.users.add(user)
        return Response(status=status.HTTP_204_NO_CONTENT)
564015
def get_organism_permissions(self, group):
        
        data = {
            'name': group,
        }
        response = _fix_group(self.post('getOrganismPermissionsForGroup', data))
        return response
696542
def create_api_object_group_permission_general(self):
        """"""

        return ApiObjectGroupPermissionGeneral(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
622327
void updateAllRights(Grantee role) {

        for (int i = 0; i < map.size(); i++) {
            Grantee grantee = (Grantee) map.get(i);

            if (grantee.isRole) {
                grantee.updateNestedRoles(role);
            }
        }

        for (int i = 0; i < map.size(); i++) {
            Grantee grantee = (Grantee) map.get(i);

            if (!grantee.isRole) {
                grantee.updateAllRights();
            }
        }
    }
819240
def update_security_group(self, security_group, body=None):
        """"""
        return self.put(self.security_group_path %
                        security_group, body=body)