Example #1
0
 def get_user_effective_permissions(self, user_name):
     """Gets the effective permissions that the specified user has within the current application scope.
     :type user_name: str
     """
     result = ClientResult(BasePermissions())
     qry = ServiceOperationQuery(self, "GetUserEffectivePermissions", [user_name], None, None, result)
     self.context.add_query(qry)
     return result
Example #2
0
    def get_user_effective_permissions(self, user_name):
        """
        Returns the user permissions for this list.

        :param str user_name: Specifies the user login name.
        """
        result = ClientResult(BasePermissions())
        qry = ServiceOperationQuery(self, "getUserEffectivePermissions", [user_name], None, None, result)
        self.context.add_query(qry)
        return result
Example #3
0
 def test4_does_user_has_perms(self):
     perms = BasePermissions()
     perms.set(PermissionKind.ManageWeb)
     result = self.client.web.does_user_have_permissions(perms)
     self.client.execute_query()
     self.assertIsInstance(result.value, bool)
 def effectiveBasePermissions(self):
     """Gets a value that specifies the effective permissions on the list item that are assigned
        to the current user."""
     from office365.sharepoint.permissions.basePermissions import BasePermissions
     return self.properties.get("EffectiveBasePermissions",
                                BasePermissions())
 def __init__(self):
     """Contains properties that are used as parameters to initialize a role definition."""
     super(RoleDefinitionCreationInformation, self).__init__()
     self.Name = None
     self.Description = None
     self.BasePermissions = BasePermissions()