Coder Social home page Coder Social logo

Comments (5)

longjuan avatar longjuan commented on August 19, 2024

Hi,@ruibaby

<Transition v-else appear name="fade">
<ul
class="box-border h-full w-full divide-y divide-gray-100"
role="list"
>
<li v-for="(file, index) in s3Objects.objects" :key="index">
<VEntity :is-selected="checkSelection(file)">
<template
#checkbox
>
<input
v-model="selectedFiles"
:value="file.key || ''"
class="h-4 w-4 rounded border-gray-300 text-indigo-600"
name="post-checkbox"
:disabled="file.isLinked"
type="checkbox"
/>
</template>
<template #start>

有空帮忙看下,没看出哪里的问题,在 halo-dev/halo#4598 之后就有问题。

from plugin-s3.

ruibaby avatar ruibaby commented on August 19, 2024

应该是和这行有关:

v-permission="['system:users:aaa']"

system:users:aaa 似乎没有在任何的 role template 中定义,如果这里不需要 UI 权限判断,移除这个指令即可。

halo-dev/halo#4598 之后才暴露这个问题是因为以前超管角色的 uiPermissions 是 *(代表拥有所有权限),但这个 PR 可能因为 PAT 的特性需要,会将角色拥有的所有角色模板的 ui permissions 列出提供给前端用于判断。

这个改动是必要的,已经暴露出了一些遗留问题,比如 halo-sigs/plugin-photos#24 (comment)

from plugin-s3.

longjuan avatar longjuan commented on August 19, 2024

应该是和这行有关:

v-permission="['system:users:aaa']"

system:users:aaa 似乎没有在任何的 role template 中定义,如果这里不需要 UI 权限判断,移除这个指令即可。

halo-dev/halo#4598 之后才暴露这个问题是因为以前超管角色的 uiPermissions 是 *(代表拥有所有权限),但这个 PR 可能因为 PAT 的特性需要,会将角色拥有的所有角色模板的 ui permissions 列出提供给前端用于判断。

这个改动是必要的,已经暴露出了一些遗留问题,比如 halo-sigs/plugin-photos#24 (comment)

感谢,确实是这个问题,当时抄代码的时候随手改了一个没注意。
之前考虑加上权限模板,但是页面移到插件详情页以后,没有插件管理权限就无法进入相应页面(插件查看权限也不行),有空了我提个issuse。

from plugin-s3.

ruibaby avatar ruibaby commented on August 19, 2024

但是页面移到插件详情页以后,没有插件管理权限就无法进入相应页面(插件查看权限也不行)

现在有查看权限应该可以,应该是 2.9 之后 Console 部分的插件扩展加载就不需要插件查看权限了,因为已经把 Console 部分的扩展合并成了 bundle.js,所有登录用户都可以访问。

但这个关联功能既然放在了插件详情页面,是不是可以考虑直接依赖插件的查看权限?

cc @JohnNiang

如果考虑到这个关联功能要开放给没有插件查看权限的人使用的话,可能放在插件详情的选项卡就不是很合适了。

from plugin-s3.

JohnNiang avatar JohnNiang commented on August 19, 2024

IMO,关联 S3 文件的功能入口如果能放置在下图中红色框处,会不会更好呢?

image

如果当前用户有附件管理权限,则显示“关联 S3 文件”按钮,并进入对应的页面。

from plugin-s3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.