aws-python-helper 1.3.0__py3-none-any.whl → 1.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,8 +79,15 @@ class Dispatcher:
79
79
  # 2. Authorization based on mode
80
80
  authorization = os.getenv('AUTHORIZATION', '').lower()
81
81
  requires_user = authorization in ('user', 'full', 'permission')
82
- requires_state = authorization in ('state', 'full')
83
- requires_permission = authorization == 'permission'
82
+ requires_permission = authorization == 'permission'
83
+
84
+ # Pedir el state es independiente de pedir un permiso, así que va por
85
+ # su propia variable. Los valores viejos `state` y `full` la implican,
86
+ # para que un servicio sin migrar siga comportándose igual.
87
+ requires_state = (
88
+ authorization in ('state', 'full')
89
+ or os.getenv('REQUIRES_STATE', '').lower() in ('1', 'true', 'yes')
90
+ )
84
91
 
85
92
  # 2a. Authenticate (if mode requires user)
86
93
  if requires_user:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aws-python-helper
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: AWS Python Helper Framework
5
5
  Author-email: Fabian Claros <neufabiae@gmail.com>
6
6
  License-Expression: MIT
@@ -3,7 +3,7 @@ aws_python_helper/api/__init__.py,sha256=2H8s1bbZArgrlecFb0YDQjBQKphhhwl70zx5oGC
3
3
  aws_python_helper/api/auth_middleware.py,sha256=KU6tyH6gPOsaG4oLRr-O2Edbmz92sc39GI7ZsIbVhco,3432
4
4
  aws_python_helper/api/auth_validators.py,sha256=knpMd6NA5Lo2JLgkgJhAQnFzm38I9LzI_SInrVIR-gk,8563
5
5
  aws_python_helper/api/base.py,sha256=5nUF6MM5dRXUtC_DytM8xlaC3Jx_dBeKoSOBRg2Gc-c,9897
6
- aws_python_helper/api/dispatcher.py,sha256=GJfb7SYaft9-BIKlnjYOOEWBppZwOD07xGqmVzmNUV4,9983
6
+ aws_python_helper/api/dispatcher.py,sha256=ikqsLmxYLNjNFzdN-oXwzsB_ZG7bljJOyqEWRpSnLsg,10337
7
7
  aws_python_helper/api/exceptions.py,sha256=C8G5jn0c6sTtHWG4daLdnqe57IbqNzsQolSBsl_YNno,1019
8
8
  aws_python_helper/api/fetcher.py,sha256=TVzfL2uIe8uvWzC1kZ9VPE0JOYd73XUjs8xu9ViBl7o,7758
9
9
  aws_python_helper/api/handler.py,sha256=IRfJUhYwp8ymBLOXsqsdhEIBmpUFaMuBAGGMjS23jaY,3467
@@ -46,7 +46,7 @@ aws_python_helper/utils/__init__.py,sha256=1L4bUGhMKy_UmXx-w03SDZetGo5MDOB_LIP_f
46
46
  aws_python_helper/utils/json_encoder.py,sha256=kPrglxttUF7ysW4LkUbzh89Va3jM3s12J98MH-mnKLE,2748
47
47
  aws_python_helper/utils/response.py,sha256=IxN6HxUkL_pcOMdfXj1WFjIyCBDV0BU9AC_e4ecOkU8,3633
48
48
  aws_python_helper/utils/serializer.py,sha256=WNM5izzL5sm9iPruqZbXrrzK5Kl4VxqEWLz5zQ9FeVs,2869
49
- aws_python_helper-1.3.0.dist-info/METADATA,sha256=6x8ni6uzvxeJ5jzo9UYDKeCdSvGjMEtFe81OU4zGFgA,70276
50
- aws_python_helper-1.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
51
- aws_python_helper-1.3.0.dist-info/top_level.txt,sha256=W_0xjk-0rtf9zOwWqSQaNwgZw6EF-cjmNTAdRtXZFHk,18
52
- aws_python_helper-1.3.0.dist-info/RECORD,,
49
+ aws_python_helper-1.4.0.dist-info/METADATA,sha256=qhaLY1bQTFPhA8A-wEq4XP4U_MKOL5EXQPc8HEA0HAg,70276
50
+ aws_python_helper-1.4.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
51
+ aws_python_helper-1.4.0.dist-info/top_level.txt,sha256=W_0xjk-0rtf9zOwWqSQaNwgZw6EF-cjmNTAdRtXZFHk,18
52
+ aws_python_helper-1.4.0.dist-info/RECORD,,