Skip to content

Default capabilities for normal user and admin user not same as in oC-core #1285

@kiranparajuli589

Description

@kiranparajuli589

Description

Default capabilities set to normal user using ocis-reva and oC core as backend are different.

Steps to Reproduce:

  1. export REVA_USERS_DRIVER=demo
  2. start ocis-reva server
  3. Send a curl request to get default capabilities set for that user and save the response
curl -X GET http://localhost:9140/ocs/v1.php/cloud/capabilities -v -u einstein:relativity | xmllint --format -
  1. Now create a normal user from oc-backend using occ command or UI whatever you prefer
  2. Send another curl request to get default capabilities set for user created from oc-backend and save the response
curl -X GET http://localhost/core/ocs/v1.php/cloud/capabilities -v -u new:new | xmllint --format -

Current Behaviour

Comparing two response I got, values for default_permissions, defaultPublicLinkShareName, search_min_length in files_sharing capabilities are different
Differences in two responses: only capabilities part of response xml that has different values are shown below)
Form ocis-reva response

<capabilities>
	<files>
		<privateLinks>0</privateLinks>
		<bigfilechunking>0</bigfilechunking>
	</files>
	<files_sharing>
		<share_with_group_members_only>1</share_with_group_members_only>
		<share_with_membership_groups_only>1</share_with_membership_groups_only>
		<search_min_length>3</search_min_length>
		<default_permissions>22</default_permissions>
		<user_enumeration>
			<enabled>1</enabled>
			<group_members_only>1</group_members_only>
		</user_enumeration>
		<public>
			<send_mail>1</send_mail>
			<expire_date>
				<enabled>1</enabled>
			</expire_date>
		</public>
		<user>
			<send_mail>1</send_mail>
		</user>
	</files_sharing>
</capabilities>

And same from oC-core server

<capabilities>
    <files>
        <privateLinks>1</privateLinks>
        <privateLinksDetailsParam>1</privateLinksDetailsParam>
        <bigfilechunking>1</bigfilechunking>
    </files>
    <files_sharing>
        <public>
          <expire_date>
            <enabled/>
          </expire_date>
          <send_mail/>
          <defaultPublicLinkShareName>Public link</defaultPublicLinkShareName>
        </public>
        <share_with_group_members_only/>
        <share_with_membership_groups_only/>
        <user_enumeration>
          <group_members_only/>
        </user_enumeration>
        <default_permissions>31</default_permissions>
        <search_min_length>2</search_min_length>
    </files_sharing>
</capabilities>

Full response is here:
Response with ocis-reva as server
Response with oc-core as server

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions