فهرست منبع

Merge branch 'master' of https://github.com/unaio/una

AntonLV 2 سال پیش
والد
کامیت
d9abaa9596

+ 14 - 16
README.md

@@ -1,12 +1,12 @@
-<a href="https://una.io"><img width="300" alt="UNA Platform" src="https://user-images.githubusercontent.com/22210428/186068817-62b90f4b-deed-4661-b015-8409c3720b5e.png"></a>
+<a href="https://unacms.com"><img width="300" alt="UNA Platform" src="https://github.com/user-attachments/assets/ef5c2250-e172-4b12-8948-f1084643bc55"></a>
+
 
 ## Unified Networking Applications
 
-[![UNA Official Website](https://img.shields.io/badge/website-una.io-blue.svg?style=for-the-badge)](https://una.io)
-[![GitHub license](https://img.shields.io/github/license/unaio/una?style=for-the-badge)](https://github.com/unaio/una/blob/master/license.txt)
-[![UNA All Releases](https://img.shields.io/github/downloads/unaio/una/total.svg?style=for-the-badge)](https://github.com/unaio/una)
-[![Follow UNA Team](https://img.shields.io/twitter/follow/unaplatform.svg?style=for-the-badge&label=Follow)](https://twitter.com/unaplatform)
-[![GitHub forks](https://img.shields.io/github/forks/unaio/una?style=for-the-badge)](https://github.com/unaio/una/network)
+[![Official Website](https://img.shields.io/badge/website-una.io-blue.svg?style=for-the-badge)](https://unacms.com)
+[![GitHub license](https://img.shields.io/github/license/unaio/una?style=for-the-badge)](https://github.com/unacms/una/blob/master/license.txt)
+[![Releases](https://img.shields.io/github/downloads/unaio/una/total.svg?style=for-the-badge)](https://github.com/unacms/una)
+[![GitHub forks](https://img.shields.io/github/forks/unaio/una?style=for-the-badge)](https://github.com/unacms/una/network)
 
 UNA is a **Community** Management System. The core platform is a full-stack framework for independent community websites and apps. With UNA content management, collaboration, e-commerce, learning and communication modules - aka **UNA Apps** - you can create communities of all types—from small interest groups to global social media networks.
 
@@ -37,18 +37,18 @@ UNA is a **Community** Management System. The core platform is a full-stack fram
 To install and run UNA platform, you'll need to a web-hosting server or you can use [UNA Cloud hosting](https://una.io/start) for instant launch. 
 
 
-- [UNA.IO - Official Website](https://una.io)
-- [Documentation](https://github.com/unaio/una/wiki)
-- [Discussions](https://una.io/page/discussions-home)
-- [Contact Team](https://una.io/page/contact)
-- [Installation](https://una.io/page/view-article?id=8)
+- [UNACMS.COM - Official Website](https://unacms.com)
+- [Documentation](https://unacms.com/wiki/Introduction)
+- [Discussions](https://unacms.com/page/discussions-home)
+- [Contact Team](https://unacms.com/page/contact)
+- [Installation](https://unacms.com/wiki/Installation)
 
 
 
 
 ## Download
 
-You can [download](https://github.com/unaio/una/archive/refs/heads/master.zip) the latest installable version of UNA Core and install to your server. You will need to [create an UNA.IO account](https://una.io) and link it with UNA Studio to install and update UNA Apps.
+You can [download](https://github.com/unaio/una/archive/refs/heads/master.zip) the latest installable version of UNA Core and install to your server. You will need to [create an UNACMS.COM account](https://UNACMS.com) and link it with UNA Studio to install and update UNA Apps.
 
 
 
@@ -57,10 +57,8 @@ You can [download](https://github.com/unaio/una/archive/refs/heads/master.zip) t
 
 UNA is managed by [Yasko.Studio](https://yasko.studio) team and developed with the help of [UNA Community](https://una.io).
 
-* Free community support - [UNA.IO Discussions](https://una.io/page/discussions-home)
-* Direct email support - [UNA.IO Pro](https://una.io/start)
-* Professional services - [Yasko.Studio](https://yasko.studio)
-
+* Free community support - [Discussions](https://uunacms.com/page/discussions-home)
+* Direct support and professional services - [UNA Pro](https://unacms.com/start)
 
 
 ## License

+ 16 - 2
inc/classes/BxDolStorageS3v4alt.php

@@ -24,14 +24,28 @@ class BxDolStorageS3v4alt extends BxDolStorageS3
 {
     protected function init ($aObject)
     {
+        $sAccessKey = getParam('sys_storage_s3_access_key'),
+        $sSecretKey = getParam('sys_storage_s3_secret_key'),
+        $aCredentials = [];
+        if (getParam('sys_storage_s3_amz_iam_role')) {
+            $sRole = bx_file_get_contents('http://169.254.169.254/latest/meta-data/iam/security-credentials/');
+            $sCredentials = bx_file_get_contents('http://169.254.169.254/latest/meta-data/iam/security-credentials/' . $role);
+            if ($sCredentials && ($aCredentials = @json_decode($sCredentials, true))) {
+                $sAccessKey = $aCredentials['AccessKeyId'];
+            	$sSecretKey = $aCredentials['SecretAccessKey'];
+            }
+        }
+
         $oConfiguration = new Akeeba\Engine\Postproc\Connector\S3v4\Configuration(
-            getParam('sys_storage_s3_access_key'),
-            getParam('sys_storage_s3_secret_key'),
+            $sAccessKey,
+            $sSecretKey,
             getParam('sys_storage_s3_sig_ver'),
             getParam('sys_storage_s3_region')
         );
         if ($this->_sEndpoint)
             $oConfiguration->setEndpoint($this->_sEndpoint);
+        if ($aCredentials && isset($aCredentials['Token']))
+            $oConfiguration->setToken($aCredentials['Token']);
 
         $this->_s3 = new Akeeba\Engine\Postproc\Connector\S3v4\Connector($oConfiguration);
     }

+ 2 - 2
install/sql/system.sql

@@ -608,8 +608,8 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'sys_storage_s3_domain', '_adm_stg_cpt_option_sys_storage_s3_domain', '', 'digit', '', '', '', 5),
 (@iCategoryId, 'sys_storage_s3_endpoint', '_adm_stg_cpt_option_sys_storage_s3_endpoint', '', 'digit', '', '', '', 6),
 (@iCategoryId, 'sys_storage_s3_sig_ver', '_adm_stg_cpt_option_sys_storage_s3_sig_ver', 'v2', 'select', 'v2,v4', '', '', 7),
-(@iCategoryId, 'sys_storage_s3_region', '_adm_stg_cpt_option_sys_storage_s3_region', '', 'digit', '', '', '', 8);
-
+(@iCategoryId, 'sys_storage_s3_region', '_adm_stg_cpt_option_sys_storage_s3_region', '', 'digit', '', '', '', 8),
+(@iCategoryId, 'sys_storage_s3_amz_iam_role', '_adm_stg_cpt_option_sys_storage_s3_amz_iam_role', '', 'checkbox', '', '', '', 10);
 --
 -- CATEGORY: Account
 --

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -1690,6 +1690,7 @@
 	<string name="_adm_stg_cpt_option_sys_storage_s3_endpoint"><![CDATA[Endpoint (specify if other than Amazon, such as storage.googleapis.com, s3.wasabisys.com)]]></string>
 	<string name="_adm_stg_cpt_option_sys_storage_s3_sig_ver"><![CDATA[Signature version (only S3v4alt storage supports both v2 and v4)]]></string>
 	<string name="_adm_stg_cpt_option_sys_storage_s3_region"><![CDATA[Region (for signature v4 only)]]></string>
+    <string name="_adm_stg_cpt_option_sys_storage_s3_amz_iam_role"><![CDATA[Authenticate using Amazon  IAM Role (S3v4alt storage only)]]></string>
 
     <string name="_adm_stg_cpt_option_sys_template_cache_image_enable"><![CDATA[Enable cache for images]]></string>
     <string name="_adm_stg_cpt_option_sys_template_cache_image_max_size"><![CDATA[Cached image max size (in Kb)]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -1665,6 +1665,7 @@
 	<string name="_adm_stg_cpt_option_sys_storage_s3_endpoint"><![CDATA[Endpoint (например storage.googleapis.com или s3.wasabisys.com, для Amazon оставивить пустым)]]></string>
 	<string name="_adm_stg_cpt_option_sys_storage_s3_sig_ver"><![CDATA[Версия подписи (только S3v4alt движок поддерживает обе версии v4 и v2)]]></string>
 	<string name="_adm_stg_cpt_option_sys_storage_s3_region"><![CDATA[Регион (только для подписи v4)]]></string>
+    <string name="_adm_stg_cpt_option_sys_storage_s3_amz_iam_role"><![CDATA[Аутентификация с использованием Amazon IAM Role (только для S3v4alt)]]></string>
 
     <string name="_adm_stg_cpt_option_sys_template_cache_image_enable"><![CDATA[Задействовать кэш для изображений]]></string>
     <string name="_adm_stg_cpt_option_sys_template_cache_image_max_size"><![CDATA[Максимальный размер кэшируемого изображения (в Кб)]]></string>