You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "janhoy (via GitHub)" <gi...@apache.org> on 2023/02/17 23:03:38 UTC

[GitHub] [solr] janhoy opened a new pull request, #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

janhoy opened a new pull request, #1371:
URL: https://github.com/apache/solr/pull/1371

   https://issues.apache.org/jira/browse/SOLR-15928
   
   This is the first of several permission related edits to Admin UI. The "Add Collection" button was already disabled when user lacked `collection-admin-edit`, but it was not dimmed/greyed so hard to understand why you could not click.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] epugh commented on a diff in pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #1371:
URL: https://github.com/apache/solr/pull/1371#discussion_r1111013066


##########
solr/webapp/web/partials/collections.html:
##########
@@ -122,8 +124,8 @@
 
     <div id="actions" class="actions clearfix" ng-show="collection">
 
-      <button id="delete-collection" class="warn requires-core" ng-click="showDeleteCollection()" ng-show="collection && collection.type === 'collection'"><span>Delete collection</span></button>
-      <button id="delete-alias" class="action requires-core" ng-click="toggleDeleteAlias()" ng-show="collection && collection.type === 'alias'"><span>Delete alias</span></button>
+      <button id="delete-collection" ng-class="{warn,disabled:!canEditColl}" ng-disabled="!canEditColl" ng-click="showDeleteCollection()" ng-show="collection && collection.type === 'collection'"><span>Delete collection</span></button>
+      <button id="delete-alias" ng-class="{action,disabled:!canEditColl}" ng-disabled="!canEditColl" ng-click="toggleDeleteAlias()" ng-show="collection && collection.type === 'alias'"><span>Delete alias</span></button>

Review Comment:
   I am rather NOT surprised to find old css tags littering the code ;-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy commented on pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #1371:
URL: https://github.com/apache/solr/pull/1371#issuecomment-1437043479

   > It might be confusing as to why everything is disabled. How about changing the mouse cursor to not allowed one on hover? https://www.w3schools.com/cssref/pr_class_cursor.php
   
   That's exactly what [this CSS](https://github.com/apache/solr/pull/1371/files#diff-5f3d61c8851b05c023de5314811847063a2c30652493dbba13ba41a88092e444R154) does already :-) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] epugh commented on a diff in pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #1371:
URL: https://github.com/apache/solr/pull/1371#discussion_r1111012558


##########
solr/webapp/web/partials/collections.html:
##########
@@ -84,7 +84,9 @@
         </p>
 
         <p class="clearfix buttons">
-          <button type="submit" class="submit" ng-disabled="!isPermitted(permissions.COLL_EDIT_PERM)" ng-click="addCollection()"><span>Add Collection</span></button>
+          <button type="submit" ng-class="{submit,disabled:!canEditColl}" ng-disabled="!canEditColl" ng-click="addCollection()">

Review Comment:
   the `{ }` syntax is new to me (I think)...   I like how this looks...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy merged pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy merged PR #1371:
URL: https://github.com/apache/solr/pull/1371


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy commented on pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #1371:
URL: https://github.com/apache/solr/pull/1371#issuecomment-1436859444

   > LGTM.. canEditCollection() maybe?
   
   Yea, just tried to get a shorter version of `isPermitted(permissions.COLL_EDIT_PERM)`, but perhaps it is just as good to spell the permission out in HTML every time than to make `$scope.canFoo` variables for everything?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy commented on pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on PR #1371:
URL: https://github.com/apache/solr/pull/1371#issuecomment-1438474331

   Now also disabling "Reload" button.
   ![Skjermbilde 2023-02-21 kl  14 14 39](https://user-images.githubusercontent.com/409128/220354685-c893bcb6-d30f-4b8f-9b61-424f5705cc47.png)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] chatman commented on pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "chatman (via GitHub)" <gi...@apache.org>.
chatman commented on PR #1371:
URL: https://github.com/apache/solr/pull/1371#issuecomment-1436869396

   It might be confusing as to why everything is disabled. How about changing the mouse cursor to not allowed one on hover? https://www.w3schools.com/cssref/pr_class_cursor.php


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] janhoy commented on a diff in pull request #1371: SOLR-15928 Dim add collection buttons in Admin UI when no permission

Posted by "janhoy (via GitHub)" <gi...@apache.org>.
janhoy commented on code in PR #1371:
URL: https://github.com/apache/solr/pull/1371#discussion_r1110436119


##########
solr/webapp/web/partials/collections.html:
##########
@@ -122,8 +124,8 @@
 
     <div id="actions" class="actions clearfix" ng-show="collection">
 
-      <button id="delete-collection" class="warn requires-core" ng-click="showDeleteCollection()" ng-show="collection && collection.type === 'collection'"><span>Delete collection</span></button>
-      <button id="delete-alias" class="action requires-core" ng-click="toggleDeleteAlias()" ng-show="collection && collection.type === 'alias'"><span>Delete alias</span></button>
+      <button id="delete-collection" ng-class="{warn,disabled:!canEditColl}" ng-disabled="!canEditColl" ng-click="showDeleteCollection()" ng-show="collection && collection.type === 'collection'"><span>Delete collection</span></button>
+      <button id="delete-alias" ng-class="{action,disabled:!canEditColl}" ng-disabled="!canEditColl" ng-click="toggleDeleteAlias()" ng-show="collection && collection.type === 'alias'"><span>Delete alias</span></button>

Review Comment:
   I removed the `requires-core` class, since I could not find a way to add it to this syntax without errors in the console. Don't know what the `requires-core` class even does, cannot find it in CSS...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org