I would like Files and Discussion topics only performed by Administrators

I am using Elgg to host personal studies for our church. Is there a way not to allow the standard user to upload files or create a discussion topic?

  • 1 - Download My plugin (Currently only available for Elgg 5, but I will release a version for Elgg 6 in a few hours.)

    2 - Open \my_plugin\elgg-plugin.php and after 

    'bootstrap' => \MyPlugin\Bootstrap::class, // for more options

    add this section:

    'actions' => [
       'discussion/save' => [
          'access' => 'admin',
       ],
    
       'file/upload' => [
         'access' => 'admin',
       ],
    ],
    3 - Save this file.
     
    4 - Upload \my_plugin folder to /mod directory on your server.
     
    5 - Go to /admin Dashboard -> Plugins; place 'My plugin' at the bottom (by default it should be there) and activate it.
     
    Now only admins can create a discussion and upload a file on your site.