@ddj-v2/user-management 2.3.0 → 2.4.1

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.
package/index.ts CHANGED
@@ -281,6 +281,13 @@ export async function apply(ctx: Context) {
281
281
  };
282
282
  return DomainUserHandler;
283
283
  });
284
+ ctx.withHandlerClass('SwitchAccount', (SwitchAccountHandler : { prototype: any }) => {
285
+ SwitchAccountHandler.prototype.get = SwitchAccountHandler.prototype.post = async function() {
286
+ throw new PermissionError(`SwitchAccountHandler get called, but it should be overridden by user management plugin.
287
+ If you really need this feature, please contact the administrator to enable the user management plugin.`);
288
+ };
289
+ return SwitchAccountHandler;
290
+ });
284
291
  // 添加国际化支持
285
292
  ctx.i18n.load('zh', {
286
293
  'user_manage_main': '用户管理',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddj-v2/user-management",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "description": "Advanced user management plugin for Hydro",
5
5
  "main": "index.ts",
6
6
  "author": "Grass_cat",
@@ -122,7 +122,6 @@
122
122
  </div>
123
123
 
124
124
  <!-- 分页 -->
125
- {% if upcount > 50 %}
126
125
  <div class="section__body">
127
126
  <div class="row">
128
127
  <div class="columns">
@@ -130,7 +129,6 @@
130
129
  </div>
131
130
  </div>
132
131
  </div>
133
- {% endif %}
134
132
  </div>
135
133
 
136
134
  <style>
@@ -231,4 +229,4 @@ $(document).ready(function() {
231
229
  });
232
230
  });
233
231
  </script>
234
- {% endblock %}
232
+ {% endblock %}