[owncloud-devel] Fwd: Changing the file sharing configuration options via API

Vincent Petry pvince81 at owncloud.com
Thu Nov 19 11:01:09 GMT 2015


Yes, or you could do it directly in the database in the oc_appconfig table.

I'm assuming that you are not writing your own app.

If you are writing your own app, then you could use the PHP code I
posted before.

Cheers,

Vincent

On 19.11.2015 11:48, Arkadiusz Kaliwoda wrote:
> Hmmm. so if i am using 8.1.x, then i can only do this configuration vie
> web-based UI. correct?
>
> Thanks
> Kali
>
> On Thu, Nov 19, 2015 at 11:41 AM, Vincent Petry <pvince81 at owncloud.com>
> wrote:
>
>> This is a new feature in 8.2.
>>
>> Cheers,
>>
>> Vincent
>>
>>
>> On 19.11.2015 11:37, Arkadiusz Kaliwoda wrote:
>>
>> Hi Vincent,
>>
>> Thank you very much for support!
>>
>>
>> Unfortunately ./occ does not show the config:app:set option. Please see
>> below the output. Is it something that i need to enable or maybe have oc in
>> maintenance mode?
>>
>> The 2nd question is if there exists "walk" api command so i can see what
>> are the API attribute available to be configured per app.
>>
>> Thanks a lot
>> Kali
>>
>> app
>>  app:check-code                  check code to be compliant
>>  app:disable                     disable an app
>>  app:enable                      enable an app
>>  app:list                        List all available apps
>> background
>>  background:ajax                 Use ajax to run background jobs
>>  background:cron                 Use cron to run background jobs
>>  background:webcron              Use webcron to run background jobs
>> db
>>  db:convert-type                 Convert the ownCloud database to the newly
>> configured one
>>  db:generate-change-script       generates the change script from the
>> current connected db to db_structure.xml
>> encryption
>>  encryption:disable              Disable encryption
>>  encryption:enable               Enable encryption
>>  encryption:list-modules         List all available encryption modules
>>  encryption:set-default-module   Set the encryption default module
>>  encryption:status               Lists the current status of encryption
>> files
>>  files:cleanup                   cleanup filecache
>>  files:scan                      rescan filesystem
>> l10n
>>  l10n:createjs                   Create javascript translation files for a
>> given app
>> maintenance
>>  maintenance:mode                set maintenance mode
>>  maintenance:repair              repair this installation
>>  maintenance:singleuser          set single user mode
>> user
>>  user:add                        adds a user
>>  user:delete                     deletes the specified user
>>  user:lastseen                   shows when the user was logged it last time
>>  user:report                     shows how many users have access
>>  user:resetpassword              Resets the password of the named user
>>
>>
>> On Thu, Nov 19, 2015 at 10:27 AM, Vincent Petry <pvince81 at owncloud.com> <pvince81 at owncloud.com>
>> wrote:
>>
>>
>> Hi,
>>
>> Those settings are stored in the "oc_appconfig" table with the app id
>> "core".
>>
>> So you might be able to modify these values by using the following:
>> \OC::$server->getAppConfig()->setValue('core',
>> 'shareapi_allow_mail_notification', 'yes');
>>
>> Or if you want to do this from the command line:
>> "occ config:app:set core shareapi_allow_mail_notification --value="no""
>>
>> Cheers,
>>
>> Vincent
>>
>>
>> On 19.11.2015 10:26, Arkadiusz Kaliwoda wrote:
>>
>> [I sent this to user at owncloud.org
>>  which i guess is not the best practice.
>> So sending to devel list]
>>
>> Hello,
>>
>> I am using Share Files 0.6.3 in my ownCloud installation. I would like to
>> read/modify the global sharing configuration settings that are in the admin
>> page via API. In order to control options like "Allow users to send mail
>> notification for shared files" or "Allow users to send mail notification
>> for shared files to other users"
>>
>> I have checked the share API documentation (https://doc.owncloud.org/server/6.0/developer_manual/core/ocs-share-api.html)
>> and unless i am missing something obvious, I could not find an API to
>> control the general sharing settings...
>>
>> My goal is to configure ownCloud automically with "some settings". Most of
>> the default settings are configured via user.config.php, themes, mount.json
>> etc. However i am clueless on how to control the admin sharing settings.
>>
>> I hope that someone on this list knows and can give me a hint
>>
>> Much appreciated
>> Thanks
>> Kali
>>
>>
>>
>>
>> _______________________________________________
>> Devel mailing listDevel at owncloud.orghttp://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>>
>> _______________________________________________
>> Devel mailing listDevel at owncloud.orghttp://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>>
>> _______________________________________________
>> Devel mailing listDevel at owncloud.orghttp://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at owncloud.org
>> http://mailman.owncloud.org/mailman/listinfo/devel
>>
>>
>
>
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20151119/c664feb1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20151119/c664feb1/attachment-0001.sig>


More information about the Devel mailing list